linux-stable/net/rds
Peilin Ye 4b49b16999 rds: Prevent kernel-infoleak in rds_notify_queue_get()
commit bbc8a99e95 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: f037590fff ("rds: fix a leak of kernel memory")
Fixes: bdbe6fbc6a ("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:50 +02:00
..
af_rds.c
bind.c rds: fix refcount bug in rds_sock_addref 2019-02-12 19:46:10 +01:00
cong.c
connection.c
ib.c net/rds: Fix error handling in rds_ib_add_one() 2019-10-07 18:55:20 +02:00
ib.h rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead 2018-10-13 09:27:29 +02:00
ib_cm.c rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead 2018-10-13 09:27:29 +02:00
ib_fmr.c net: rds: exchange of 8K and 1M pool 2019-05-02 09:40:33 +02:00
ib_frmr.c RDS: IB: fix 'passing zero to ERR_PTR()' warning 2018-09-15 09:45:31 +02:00
ib_mr.h
ib_rdma.c net: rds: fix memory leak in rds_ib_flush_mr_pool 2019-06-11 12:21:45 +02:00
ib_recv.c rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead 2018-10-13 09:27:29 +02:00
ib_ring.c
ib_send.c
ib_stats.c net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2020-01-27 14:46:47 +01:00
ib_sysctl.c
info.c
info.h
Kconfig
loop.c rds: avoid unenecessary cong_update in loop transport 2018-07-22 14:28:49 +02:00
loop.h
Makefile
message.c
page.c
rdma.c
rdma_transport.c
rdma_transport.h
rds.h rds: avoid unenecessary cong_update in loop transport 2018-07-22 14:28:49 +02:00
rds_single_path.h
recv.c rds: Prevent kernel-infoleak in rds_notify_queue_get() 2020-08-05 10:06:50 +02:00
send.c
stats.c net/rds: Add a few missing rds_stat_names entries 2020-01-27 14:46:42 +01:00
sysctl.c
tcp.c net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock(). 2019-04-17 08:37:46 +02:00
tcp.h
tcp_connect.c
tcp_listen.c rds: Incorrect reference counting in TCP socket creation 2018-05-30 07:52:10 +02:00
tcp_recv.c
tcp_send.c
tcp_stats.c
threads.c
transport.c