Commit db27ebb111e9f69efece08e4cb6a34ff980f8896

Authored by Sasha Levin
Committed by David S. Miller
1 parent 5201aa49b0

net: rds: use correct size for max unacked packets and bytes

Max unacked packets/bytes is an int while sizeof(long) was used in the
sysctl table.

This 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 2 additions and 2 deletions Side-by-side Diff

... ... @@ -71,14 +71,14 @@
71 71 {
72 72 .procname = "max_unacked_packets",
73 73 .data = &rds_sysctl_max_unacked_packets,
74   - .maxlen = sizeof(unsigned long),
  74 + .maxlen = sizeof(int),
75 75 .mode = 0644,
76 76 .proc_handler = proc_dointvec,
77 77 },
78 78 {
79 79 .procname = "max_unacked_bytes",
80 80 .data = &rds_sysctl_max_unacked_bytes,
81   - .maxlen = sizeof(unsigned long),
  81 + .maxlen = sizeof(int),
82 82 .mode = 0644,
83 83 .proc_handler = proc_dointvec,
84 84 },