Skip to content

Commit 6b8d911

Browse files
sashalevindavem330
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. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6088bee commit 6b8d911

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: net/llc/sysctl_net_llc.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ static struct ctl_table llc2_timeout_table[] = {
1818
{
1919
.procname = "ack",
2020
.data = &sysctl_llc2_ack_timeout,
21-
.maxlen = sizeof(long),
21+
.maxlen = sizeof(sysctl_llc2_ack_timeout),
2222
.mode = 0644,
2323
.proc_handler = proc_dointvec_jiffies,
2424
},
2525
{
2626
.procname = "busy",
2727
.data = &sysctl_llc2_busy_timeout,
28-
.maxlen = sizeof(long),
28+
.maxlen = sizeof(sysctl_llc2_busy_timeout),
2929
.mode = 0644,
3030
.proc_handler = proc_dointvec_jiffies,
3131
},
3232
{
3333
.procname = "p",
3434
.data = &sysctl_llc2_p_timeout,
35-
.maxlen = sizeof(long),
35+
.maxlen = sizeof(sysctl_llc2_p_timeout),
3636
.mode = 0644,
3737
.proc_handler = proc_dointvec_jiffies,
3838
},
3939
{
4040
.procname = "rej",
4141
.data = &sysctl_llc2_rej_timeout,
42-
.maxlen = sizeof(long),
42+
.maxlen = sizeof(sysctl_llc2_rej_timeout),
4343
.mode = 0644,
4444
.proc_handler = proc_dointvec_jiffies,
4545
},

0 commit comments

Comments
 (0)