Peilin Ye 24578a23b2 rds: Prevent kernel-infoleak in rds_notify_queue_get()
commit bbc8a99e952226c585ac17477a85ef1194501762 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-05 10:06:01 +02:00
..
2018-08-01 09:32:35 -07:00
2018-08-01 09:32:35 -07:00
2019-05-02 09:59:00 +02:00
2018-09-23 12:25:15 -07:00
2018-06-12 16:19:22 -07:00
2018-08-31 23:09:53 -07:00
2018-08-01 09:32:35 -07:00
2018-07-23 21:17:44 -07:00
2019-07-10 09:53:46 +02:00
2018-07-23 21:17:44 -07:00
2018-08-01 09:32:35 -07:00
2018-07-23 21:17:44 -07:00