OSDN Git Service

net/rds: Fix info leak in rds6_inc_info_copy()
authorKa-Cheong Poon <ka-cheong.poon@oracle.com>
Mon, 26 Aug 2019 09:39:12 +0000 (02:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2019 03:56:06 +0000 (20:56 -0700)
commit7d0a06586b2686ba80c4a2da5f91cb10ffbea736
tree99abaf39f03a2c94e52a82fe984f2a20b47d650d
parent2c1644cf6d46a8267d79ed95cb9b563839346562
net/rds: Fix info leak in rds6_inc_info_copy()

The rds6_inc_info_copy() function has a couple struct members which
are leaking stack information.  The ->tos field should hold actual
information and the ->flags field needs to be zeroed out.

Fixes: 3eb450367d08 ("rds: add type of service(tos) infrastructure")
Fixes: b7ff8b1036f0 ("rds: Extend RDS API for IPv6 support")
Reported-by: 黄ID蝴蝶 <butterflyhuangxx@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/recv.c