Commit 6eb3c3d0 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

exec: increase BINPRM_BUF_SIZE to 256

Large enterprise clients often run applications out of networked file
systems where the IT mandated layout of project volumes can end up
leading to paths that are longer than 128 characters.  Bumping this up
to the next order of two solves this problem in all but the most
egregious case while still fitting into a 512b slab.

[oleg@redhat.com: update comment, per Kees]
Link: http://lkml.kernel.org/r/20181112160956.GA28472@redhat.comSigned-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Reported-by: default avatarBen Woodard <woodard@redhat.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 26e15225
...@@ -1563,7 +1563,7 @@ static void bprm_fill_uid(struct linux_binprm *bprm) ...@@ -1563,7 +1563,7 @@ static void bprm_fill_uid(struct linux_binprm *bprm)
/* /*
* Fill the binprm structure from the inode. * Fill the binprm structure from the inode.
* Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes * Check permissions, then read the first BINPRM_BUF_SIZE bytes
* *
* This may be called multiple times for binary chains (scripts for example). * This may be called multiple times for binary chains (scripts for example).
*/ */
......
...@@ -16,6 +16,6 @@ struct pt_regs; ...@@ -16,6 +16,6 @@ struct pt_regs;
#define MAX_ARG_STRINGS 0x7FFFFFFF #define MAX_ARG_STRINGS 0x7FFFFFFF
/* sizeof(linux_binprm->buf) */ /* sizeof(linux_binprm->buf) */
#define BINPRM_BUF_SIZE 128 #define BINPRM_BUF_SIZE 256
#endif /* _UAPI_LINUX_BINFMTS_H */ #endif /* _UAPI_LINUX_BINFMTS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment