oss-sec mailing list archives
Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size
From: pageexec () freemail hu
Date: Wed, 15 Sep 2010 00:27:58 +0200
On 14 Sep 2010 at 14:16, Roland McGrath wrote:
obviously an AT_ARGMAX computed at execve time would be based on the rlimits as well and if later userland changed the rlimits, it'd be userland's problem, not that of the kernel (or the kernel could refuse a change that would violate its earlier promise).This would thoroughly defeat the purpose of adding the thing. The only reason to have a new thing is so that userland does not have to mirror the kernel's policy (as it attempts to do now, with the 1/4 calculation). If the new thing is not something that userland can use consistently so as not to have to know what the kernel's actual policy is, then I don't see the point of it at all.
userland could never rely on the kernel's policy at all since get_arg_page could have failed for more reasons than overstepping the currently hardcoded ARG_MAX check in there. so what AT_ARGMAX would buy us is to allow the kernel policy to change over time, but it's never been about guarantees, whether POSIX wants such a thing or not.
auxv is only appropriate for things that are known at the time of the exec and won't change thereafter.you mean stuff like AT_EUID et al.? ;)The information that these give is about the conditions at startup. That's what they mean to userland, and userland only uses them to know the situation before it has made any calls. The definition of AT_EUID is "effective user ID at program startup", and that fact does not change.
just for my own curiosity, where does this definition come from?
Current thread:
- Re: [PATCH] exec argument expansion can inappropriately trigger OOM-killer, (continued)
- Re: [PATCH] exec argument expansion can inappropriately trigger OOM-killer Roland McGrath (Aug 31)
- [PATCH 0/3] execve argument-copying fixes Roland McGrath (Sep 07)
- [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 07)
- Message not available
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size KOSAKI Motohiro (Sep 09)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 10)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size KOSAKI Motohiro (Sep 10)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size pageexec (Sep 11)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 14)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size pageexec (Sep 14)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 14)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size pageexec (Sep 14)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 14)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size pageexec (Sep 15)
- Message not available
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 10)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size pageexec (Sep 11)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 14)
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size pageexec (Sep 14)
- Message not available
- Re: [PATCH 1/3] setup_arg_pages: diagnose excessive argument size Roland McGrath (Sep 10)
- [PATCH 2/3] execve: improve interactivity with large arguments Roland McGrath (Sep 07)
- [PATCH 3/3] execve: make responsive to SIGKILL with large arguments Roland McGrath (Sep 07)
- Re: [PATCH 0/3] execve argument-copying fixes KOSAKI Motohiro (Sep 07)