Skip to content

Commit db27ebb

Browse files
sashalevindavem330
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]>
1 parent 5201aa4 commit db27ebb

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
@@ -71,14 +71,14 @@ static struct ctl_table rds_sysctl_rds_table[] = {
7171
{
7272
.procname = "max_unacked_packets",
7373
.data = &rds_sysctl_max_unacked_packets,
74-
.maxlen = sizeof(unsigned long),
74+
.maxlen = sizeof(int),
7575
.mode = 0644,
7676
.proc_handler = proc_dointvec,
7777
},
7878
{
7979
.procname = "max_unacked_bytes",
8080
.data = &rds_sysctl_max_unacked_bytes,
81-
.maxlen = sizeof(unsigned long),
81+
.maxlen = sizeof(int),
8282
.mode = 0644,
8383
.proc_handler = proc_dointvec,
8484
},

0 commit comments

Comments
 (0)