Skip to content

Commit 45fd12d

Browse files
sashalevinMukesh Kacker
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit db27ebb) Orabug: 20585918 Signed-off-by: Mukesh Kacker <[email protected]> Signed-off-by: Guangyu Sun <[email protected]>
1 parent 78b43da commit 45fd12d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/rds/sysctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ static struct ctl_table rds_sysctl_rds_table[] = {
9292
{
9393
.procname = "max_unacked_packets",
9494
.data = &rds_sysctl_max_unacked_packets,
95-
.maxlen = sizeof(unsigned long),
95+
.maxlen = sizeof(int),
9696
.mode = 0644,
9797
.proc_handler = proc_dointvec,
9898
},
9999
{
100100
.procname = "max_unacked_bytes",
101101
.data = &rds_sysctl_max_unacked_bytes,
102-
.maxlen = sizeof(unsigned long),
102+
.maxlen = sizeof(int),
103103
.mode = 0644,
104104
.proc_handler = proc_dointvec,
105105
},

0 commit comments

Comments
 (0)