Hello. Hugh Dickins wrote:
since executables are typically mapped MAP_PRIVATE, I suspect your patch will simply break mmap's intended MNT_NOEXEC check.
The one with ld.so you mean? But its a user-space issue, I haven't seen anyone claiming the opposite (and you even explicitly confirmed it is).
I think you need to face up to the fact that "noexec" doesn't suit your mount, and just leave it at that.
But noone have answered this question: Which configuration is more secure - the one where all the user-writable fs are mounted with "noexec" (in old sense of noexec), or the one without "noexec" at all because I should no longer use it here and there (actually, everywhere)?
But I do concede that I'm reluctant to present that patch Alan encouraged, adding a matching MNT_NOEXEC check to mprotect: it would be consistent, and I do like consistency, but in this case fear that change in behaviour may cause new userspace breakage.
I can't think of a single real-life example where it will break something over whatever is broken already by the mmap check. But I am not encouraging such a change of course. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC MAP_PRIVATE mmaps
- From: Hugh Dickins <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC MAP_PRIVATE mmaps
- References:
- [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Stas Sergeev <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Hugh Dickins <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Stas Sergeev <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Hugh Dickins <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Alan Cox <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Stas Sergeev <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Alan Cox <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Stas Sergeev <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Ulrich Drepper <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Stas Sergeev <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- From: Ulrich Drepper <[email protected]>
- [patch] remove MNT_NOEXEC check for PROT_EXEC MAP_PRIVATE mmaps
- From: Stas Sergeev <[email protected]>
- Re: [patch] remove MNT_NOEXEC check for PROT_EXEC MAP_PRIVATE mmaps
- From: Hugh Dickins <[email protected]>
- [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
- Prev by Date: Re: [NFS] [PATCH 009 of 11] knfsd: Allow max size of NFSd payload to be configured.
- Next by Date: Re: [PATCH] Illustration of warning explosion silliness
- Previous by thread: Re: [patch] remove MNT_NOEXEC check for PROT_EXEC MAP_PRIVATE mmaps
- Next by thread: Re: [patch] remove MNT_NOEXEC check for PROT_EXEC MAP_PRIVATE mmaps
- Index(es):