Files
kernel_xiaomi_sm8250/include/linux
Congyu Liu b67ad6170c net: fix information leakage in /proc/net/ptype
commit 47934e06b65637c88a762d9c98329ae6e3238888 upstream.

In one net namespace, after creating a packet socket without binding
it to a device, users in other net namespaces can observe the new
`packet_type` added by this packet socket by reading `/proc/net/ptype`
file. This is minor information leakage as packet socket is
namespace aware.

Add a net pointer in `packet_type` to keep the net namespace of
of corresponding packet socket. In `ptype_seq_show`, this net pointer
must be checked when it is not NULL.

Fixes: 2feb27dbe0 ("[NETNS]: Minor information leak via /proc/net/ptype file.")
Signed-off-by: Congyu Liu <liu3101@purdue.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-08 18:23:08 +01:00
..
2019-12-13 08:51:18 +01:00
2021-04-14 08:22:36 +02:00
2021-12-08 08:50:13 +01:00
2021-12-08 08:50:13 +01:00
2021-01-30 13:32:12 +01:00
2021-05-22 10:59:50 +02:00
2019-12-13 08:52:43 +01:00
2021-03-04 09:39:44 +01:00
2021-02-07 14:48:38 +01:00
2021-11-26 11:35:57 +01:00
2019-12-31 16:35:38 +01:00
2021-07-11 12:49:26 +02:00
2020-07-29 10:16:52 +02:00
2021-06-30 08:48:18 -04:00
2021-09-03 09:58:00 +02:00
2020-03-18 07:14:17 +01:00
2021-12-14 10:18:04 +01:00
2020-04-02 15:28:22 +02:00
2020-12-11 13:25:01 +01:00
2020-04-02 15:28:23 +02:00
2021-12-14 10:18:06 +01:00