* [PATCH] sysctl: fix sizeof argument to match variable name
@ 2018-03-24 20:23 Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2018-03-24 20:23 UTC (permalink / raw)
To: LKML, Andrew Morton, Linus Torvalds; +Cc: Petru Mihancea, Linux FS Devel
From: Randy Dunlap <rdunlap@infradead.org>
Fix sizeof argument to be the same as the data variable name.
Probably a copy/paste error.
Mostly harmless since both variables are unsigned int.
Fixes kernel bugzilla #197371:
Possible access to unintended variable in "kernel/sysctl.c" line 1339
https://bugzilla.kernel.org/show_bug.cgi?id=197371
Reported-by: Petru Mihancea <petrum@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
kernel/sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- lnx-416-rc6.orig/kernel/sysctl.c
+++ lnx-416-rc6/kernel/sysctl.c
@@ -1329,7 +1329,7 @@ static struct ctl_table vm_table[] = {
{
.procname = "dirtytime_expire_seconds",
.data = &dirtytime_expire_interval,
- .maxlen = sizeof(dirty_expire_interval),
+ .maxlen = sizeof(dirtytime_expire_interval),
.mode = 0644,
.proc_handler = dirtytime_interval_handler,
.extra1 = &zero,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-24 20:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-24 20:23 [PATCH] sysctl: fix sizeof argument to match variable name Randy Dunlap
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.