Commit 6b8d9117ccb4f81b1244aafa7bc70ef8fa45fc49
Committed by
David S. Miller
1 parent
6088beef3f
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
net/llc/sysctl_net_llc.c
... | ... | @@ -18,28 +18,28 @@ |
18 | 18 | { |
19 | 19 | .procname = "ack", |
20 | 20 | .data = &sysctl_llc2_ack_timeout, |
21 | - .maxlen = sizeof(long), | |
21 | + .maxlen = sizeof(sysctl_llc2_ack_timeout), | |
22 | 22 | .mode = 0644, |
23 | 23 | .proc_handler = proc_dointvec_jiffies, |
24 | 24 | }, |
25 | 25 | { |
26 | 26 | .procname = "busy", |
27 | 27 | .data = &sysctl_llc2_busy_timeout, |
28 | - .maxlen = sizeof(long), | |
28 | + .maxlen = sizeof(sysctl_llc2_busy_timeout), | |
29 | 29 | .mode = 0644, |
30 | 30 | .proc_handler = proc_dointvec_jiffies, |
31 | 31 | }, |
32 | 32 | { |
33 | 33 | .procname = "p", |
34 | 34 | .data = &sysctl_llc2_p_timeout, |
35 | - .maxlen = sizeof(long), | |
35 | + .maxlen = sizeof(sysctl_llc2_p_timeout), | |
36 | 36 | .mode = 0644, |
37 | 37 | .proc_handler = proc_dointvec_jiffies, |
38 | 38 | }, |
39 | 39 | { |
40 | 40 | .procname = "rej", |
41 | 41 | .data = &sysctl_llc2_rej_timeout, |
42 | - .maxlen = sizeof(long), | |
42 | + .maxlen = sizeof(sysctl_llc2_rej_timeout), | |
43 | 43 | .mode = 0644, |
44 | 44 | .proc_handler = proc_dointvec_jiffies, |
45 | 45 | }, |