* [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy()
@ 2019-08-22 3:18 Ka-Cheong Poon
2019-08-23 6:32 ` santosh.shilimkar
2019-08-24 21:20 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Ka-Cheong Poon @ 2019-08-22 3:18 UTC (permalink / raw)
To: netdev; +Cc: santosh.shilimkar, davem, rds-devel
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>
---
net/rds/recv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 853de48..a42ba7f 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
@@ -811,6 +811,7 @@ void rds6_inc_info_copy(struct rds_incoming *inc,
minfo6.seq = be64_to_cpu(inc->i_hdr.h_sequence);
minfo6.len = be32_to_cpu(inc->i_hdr.h_len);
+ minfo6.tos = inc->i_conn->c_tos;
if (flip) {
minfo6.laddr = *daddr;
@@ -824,6 +825,8 @@ void rds6_inc_info_copy(struct rds_incoming *inc,
minfo6.fport = inc->i_hdr.h_dport;
}
+ minfo6.flags = 0;
+
rds_info_copy(iter, &minfo6, sizeof(minfo6));
}
#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy()
2019-08-22 3:18 [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy() Ka-Cheong Poon
@ 2019-08-23 6:32 ` santosh.shilimkar
2019-08-24 21:20 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: santosh.shilimkar @ 2019-08-23 6:32 UTC (permalink / raw)
To: Ka-Cheong Poon, netdev; +Cc: davem, rds-devel
On 8/21/19 8:18 PM, Ka-Cheong Poon wrote:
> 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>
> ---
Thanks for getting this out of the list.
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy()
2019-08-22 3:18 [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy() Ka-Cheong Poon
2019-08-23 6:32 ` santosh.shilimkar
@ 2019-08-24 21:20 ` David Miller
2019-08-27 3:18 ` Ka-Cheong Poon
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2019-08-24 21:20 UTC (permalink / raw)
To: ka-cheong.poon; +Cc: netdev, santosh.shilimkar, rds-devel
From: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Date: Wed, 21 Aug 2019 20:18:24 -0700
> 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>
Why would an info leak bug fix, present in current kernels, be targetted
at 'net-next' instead of 'net'?
Please retarget this at 'net' properly, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy()
2019-08-24 21:20 ` David Miller
@ 2019-08-27 3:18 ` Ka-Cheong Poon
0 siblings, 0 replies; 4+ messages in thread
From: Ka-Cheong Poon @ 2019-08-27 3:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev, santosh.shilimkar, rds-devel
On 8/25/19 5:20 AM, David Miller wrote:
> From: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
> Date: Wed, 21 Aug 2019 20:18:24 -0700
>
>> 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>
>
> Why would an info leak bug fix, present in current kernels, be targetted
> at 'net-next' instead of 'net'?
>
> Please retarget this at 'net' properly, thank you.
Retarget patch sent. Thanks.
--
K. Poon
ka-cheong.poon@oracle.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-27 3:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22 3:18 [PATCH net-next] net/rds: Fix info leak in rds6_inc_info_copy() Ka-Cheong Poon
2019-08-23 6:32 ` santosh.shilimkar
2019-08-24 21:20 ` David Miller
2019-08-27 3:18 ` Ka-Cheong Poon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).