diff options
author | Peilin Ye <yepeilin.cs@gmail.com> | 2020-07-30 22:20:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-01 02:52:48 +0300 |
commit | bbc8a99e952226c585ac17477a85ef1194501762 (patch) | |
tree | 6e62fbfef1f8f51b488c3be4af8599b48f2cfefc /mm | |
parent | dc096288d579c82efbf6f82a5d895fed6e41e5a6 (diff) | |
download | linux-bbc8a99e952226c585ac17477a85ef1194501762.tar.xz |
rds: Prevent kernel-infoleak in rds_notify_queue_get()
rds_notify_queue_get() is potentially copying uninitialized kernel stack
memory to userspace since the compiler may leave a 4-byte hole at the end
of `cmsg`.
In 2016 we tried to fix this issue by doing `= { 0 };` on `cmsg`, which
unfortunately does not always initialize that 4-byte hole. Fix it by using
memset() instead.
Cc: stable@vger.kernel.org
Fixes: f037590fff30 ("rds: fix a leak of kernel memory")
Fixes: bdbe6fbc6a2f ("RDS: recv.c")
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions