Skip to content

Commit

Permalink
net: llc: use correct size for sysctl timeout entries
Browse files Browse the repository at this point in the history
The timeout entries are sizeof(int) rather than sizeof(long), which
means that when they were getting read we'd also leak kernel memory
to userspace along with the timeout values.

Change-Id: I873e992995607295b05ad120b550395f57479130
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: franciscofranco <[email protected]>
  • Loading branch information
sashalevin authored and franciscofranco committed Oct 6, 2016
1 parent cfbeba6 commit 542352b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/llc/sysctl_net_llc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ static struct ctl_table llc2_timeout_table[] = {
{
.procname = "ack",
.data = &sysctl_llc2_ack_timeout,
.maxlen = sizeof(long),
.maxlen = sizeof(sysctl_llc2_ack_timeout),
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
{
.procname = "busy",
.data = &sysctl_llc2_busy_timeout,
.maxlen = sizeof(long),
.maxlen = sizeof(sysctl_llc2_busy_timeout),
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
{
.procname = "p",
.data = &sysctl_llc2_p_timeout,
.maxlen = sizeof(long),
.maxlen = sizeof(sysctl_llc2_p_timeout),
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
{
.procname = "rej",
.data = &sysctl_llc2_rej_timeout,
.maxlen = sizeof(long),
.maxlen = sizeof(sysctl_llc2_rej_timeout),
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
Expand Down

0 comments on commit 542352b

Please sign in to comment.