Commit ecca64226ce2960280921e09ae33e90f82b5c408

Authored by Sasha Levin
Committed by Greg Kroah-Hartman
1 parent 2a9eb844a4

net: llc: use correct size for sysctl timeout entries

commit 6b8d9117ccb4f81b1244aafa7bc70ef8fa45fc49 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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 },