android_kernel_xiaomi_sdm845/net/rds
Peilin Ye 2b9c45b6dc 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: 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-21 11:01:49 +02:00
..
af_rds.c
bind.c rds: fix refcount bug in rds_sock_addref 2019-02-12 19:45:00 +01:00
cong.c
connection.c
ib_cm.c rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp 2018-11-10 07:42:50 -08:00
ib_fmr.c net: rds: exchange of 8K and 1M pool 2019-05-02 09:32:05 +02:00
ib_frmr.c
ib_mr.h
ib_rdma.c net: rds: fix memory leak in rds_ib_flush_mr_pool 2019-06-11 12:22:46 +02:00
ib_recv.c
ib_ring.c
ib_send.c
ib_stats.c net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2020-01-29 10:24:32 +01:00
ib_sysctl.c
ib.c net/rds: Fix error handling in rds_ib_add_one() 2019-10-07 18:53:23 +02:00
ib.h
info.c
info.h
Kconfig
loop.c
loop.h
Makefile
message.c
page.c
rdma_transport.c
rdma_transport.h
rdma.c
rds_single_path.h
rds.h
recv.c rds: Prevent kernel-infoleak in rds_notify_queue_get() 2020-08-21 11:01:49 +02:00
send.c
stats.c
sysctl.c
tcp_connect.c
tcp_listen.c
tcp_recv.c
tcp_send.c
tcp_stats.c
tcp.c net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock(). 2019-04-17 08:36:44 +02:00
tcp.h
threads.c
transport.c