Skip to content

Commit edcd666

Browse files
sashalevinHashcode
authored andcommitted
net: llc: use correct size for sysctl timeout entries
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: I328d1186720a6f70f555eeeb62c83ee69814868d Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 052df4c commit edcd666

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

net/llc/sysctl_net_llc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ static struct ctl_table llc2_timeout_table[] = {
1717
{
1818
.procname = "ack",
1919
.data = &sysctl_llc2_ack_timeout,
20-
.maxlen = sizeof(long),
20+
.maxlen = sizeof(sysctl_llc2_ack_timeout),
2121
.mode = 0644,
2222
.proc_handler = proc_dointvec_jiffies,
2323
},
2424
{
2525
.procname = "busy",
2626
.data = &sysctl_llc2_busy_timeout,
27-
.maxlen = sizeof(long),
27+
.maxlen = sizeof(sysctl_llc2_busy_timeout),
2828
.mode = 0644,
2929
.proc_handler = proc_dointvec_jiffies,
3030
},
3131
{
3232
.procname = "p",
3333
.data = &sysctl_llc2_p_timeout,
34-
.maxlen = sizeof(long),
34+
.maxlen = sizeof(sysctl_llc2_p_timeout),
3535
.mode = 0644,
3636
.proc_handler = proc_dointvec_jiffies,
3737
},
3838
{
3939
.procname = "rej",
4040
.data = &sysctl_llc2_rej_timeout,
41-
.maxlen = sizeof(long),
41+
.maxlen = sizeof(sysctl_llc2_rej_timeout),
4242
.mode = 0644,
4343
.proc_handler = proc_dointvec_jiffies,
4444
},

0 commit comments

Comments
 (0)