* Patch "sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec" has been added to the 4.4-stable tree
@ 2017-07-07 13:51 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-07 13:51 UTC (permalink / raw)
To: zlpnobody, akpm, ebiederm, gregkh, subashab, torvalds
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sysctl-report-einval-if-value-is-larger-than-uint_max-for-proc_douintvec.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 425fffd886bae3d127a08fa6a17f2e31e24ed7ff Mon Sep 17 00:00:00 2001
From: Liping Zhang <zlpnobody@gmail.com>
Date: Fri, 7 Apr 2017 23:51:07 +0800
Subject: sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec
From: Liping Zhang <zlpnobody@gmail.com>
commit 425fffd886bae3d127a08fa6a17f2e31e24ed7ff upstream.
Currently, inputting the following command will succeed but actually the
value will be truncated:
# echo 0x12ffffffff > /proc/sys/net/ipv4/tcp_notsent_lowat
This is not friendly to the user, so instead, we should report error
when the value is larger than UINT_MAX.
Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields")
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/sysctl.c | 2 ++
1 file changed, 2 insertions(+)
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2067,6 +2067,8 @@ static int do_proc_douintvec_conv(bool *
if (write) {
if (*negp)
return -EINVAL;
+ if (*lvalp > UINT_MAX)
+ return -EINVAL;
*valp = *lvalp;
} else {
unsigned int val = *valp;
Patches currently in stable-queue which might be from zlpnobody@gmail.com are
queue-4.4/sysctl-don-t-print-negative-flag-for-proc_douintvec.patch
queue-4.4/sysctl-report-einval-if-value-is-larger-than-uint_max-for-proc_douintvec.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-07 13:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 13:51 Patch "sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec" has been added to the 4.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.