The patch titled Subject: sysctl-terminate-strings-also-on-r-fix has been added to the -mm tree. Its filename is sysctl-terminate-strings-also-on-r-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/sysctl-terminate-strings-also-on-r-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/sysctl-terminate-strings-also-on-r-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: sysctl-terminate-strings-also-on-r-fix add missing comment Cc: Aaron Tomlin <atomlin@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> Cc: Paul Wise <pabs3@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/sysctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN kernel/sysctl.c~sysctl-terminate-strings-also-on-r-fix kernel/sysctl.c --- a/kernel/sysctl.c~sysctl-terminate-strings-also-on-r-fix +++ a/kernel/sysctl.c @@ -1739,6 +1739,10 @@ static int _proc_do_string(char *data, i while ((p - buffer) < *lenp && len < maxlen - 1) { if (get_user(c, p++)) return -EFAULT; + /* + * \r terminates input to partially prevent attackers + * from hiding info from sysadmins who use cat + */ if (c == 0 || c == '\n' || c == '\r') break; data[len++] = c; _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are origin.patch i-need-old-gcc.patch arch-alpha-kernel-systblss-remove-debug-check.patch rtc-pm8xxx-rework-to-support-pm8941-rtc-checkpatch-fixes.patch rtc-pm8xxx-rework-to-support-pm8941-rtc-fix.patch kernel-posix-timersc-code-clean-up-checkpatch-fixes.patch input-route-kbd-leds-through-the-generic-leds-layer.patch o2dlm-fix-null-pointer-dereference-in-o2dlm_blocking_ast_wrapper-checkpatch-fixes.patch ocfs2-free-inode-when-i_count-becomes-zero.patch ocfs2-add-and-remove-inode-in-orphan-dir-in-ocfs2_direct_io-fix.patch ocfs2-do-not-fallback-to-buffer-i-o-write-if-fill-holes-checkpatch-fixes.patch mm.patch mm-memcontrol-lockless-page-counters-fix.patch mm-memcontrol-lockless-page-counters-fix-fix.patch kernel-res_counter-remove-the-unused-api-fix.patch mm-compaction-simplify-deferred-compaction-fix.patch mm-memcontrol-remove-unnecessary-pcg_used-pc-mem_cgroup-valid-flag-fix.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch do_shared_fault-check-that-mmap_sem-is-held.patch fs-proc-use-a-rb-tree-for-the-directory-entries-fix.patch init-allow-config_init_fallback=n-to-disable-defaults-if-init=-fails-checkpatch-fixes.patch sysctl-terminate-strings-also-on-r-fix.patch ipc-semc-chance-memory-barrier-in-sem_lock-to-smp_rmb-fix.patch ipc-semc-chance-memory-barrier-in-sem_lock-to-smp_rmb-fix-fix.patch ipc-msg-increase-msgmni-remove-scaling-checkpatch-fixes.patch linux-next.patch drivers-gpio-gpio-zevioc-fix-build.patch mm-replace-remap_file_pages-syscall-with-emulation.patch debugging-keep-track-of-page-owners.patch debugging-keep-track-of-page-owners-fix.patch journal_add_journal_head-debug.patch journal_add_journal_head-debug-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch mutex-subsystem-synchro-test-module.patch slab-leaks3-default-y.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html