Congyu Liu
e43669c77c
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-01 17:27:07 +01:00
..
2021-11-18 19:17:06 +01:00
2022-01-27 11:02:57 +01:00
2021-12-08 09:04:54 +01:00
2022-01-27 11:02:49 +01:00
2021-09-20 12:43:34 +01:00
2021-11-25 09:48:24 +01:00
2021-11-25 09:49:07 +01:00
2021-10-14 12:47:29 +01:00
2021-11-18 19:15:59 +01:00
2022-02-01 17:27:07 +01:00
2021-12-08 09:04:41 +01:00
2021-10-07 16:51:57 +02:00
2022-01-27 11:04:15 +01:00
2022-02-01 17:27:03 +01:00
2021-09-09 19:14:33 -04:00
2021-10-26 12:35:16 -07:00
2022-01-27 11:03:27 +01:00
2021-11-18 19:16:20 +01:00
2021-12-14 10:57:09 +01:00
2021-09-24 16:13:35 -07:00
2021-11-18 19:17:21 +01:00
2021-09-13 16:35:58 -07:00
2021-09-13 16:35:58 -07:00
2021-09-08 15:32:35 -07:00
2021-09-13 10:43:04 -07:00
2021-09-12 16:09:26 -07:00
2021-09-13 10:18:28 -07:00
2021-09-13 10:43:04 -07:00
2021-12-29 12:28:49 +01:00
2021-11-18 19:16:03 +01:00
2021-09-11 00:41:21 +02:00
2021-11-18 19:16:45 +01:00
2021-10-18 20:22:03 -10:00
2021-09-21 17:34:53 +02:00
2021-12-14 10:57:11 +01:00
2021-11-18 19:16:00 +01:00
2021-11-25 09:48:41 +01:00
2022-01-05 12:42:34 +01:00
2021-10-18 20:22:03 -10:00
2021-10-05 12:38:39 +01:00
2021-11-18 19:17:06 +01:00
2022-01-11 15:35:16 +01:00
2021-12-14 10:57:09 +01:00
2021-11-18 19:16:25 +01:00
2022-01-20 09:13:13 +01:00
2021-11-25 09:49:08 +01:00
2022-01-11 15:35:11 +01:00
2021-09-23 19:26:54 +02:00
2021-10-15 21:02:50 -06:00
2022-01-27 11:04:41 +01:00
2021-09-08 18:45:53 -07:00
2021-12-29 12:28:49 +01:00
2021-11-25 09:48:42 +01:00
2022-01-27 11:05:05 +01:00
2021-09-22 14:29:32 +01:00
2021-11-18 19:16:13 +01:00
2021-11-12 15:05:49 +01:00
2021-12-08 09:04:41 +01:00
2021-09-23 11:01:12 -04:00
2021-11-18 19:15:51 +01:00
2021-11-12 15:05:48 +01:00
2021-11-12 15:05:48 +01:00
2021-09-19 12:08:37 +01:00
2022-01-05 12:42:33 +01:00
2021-10-18 20:22:02 -10:00
2021-12-14 10:57:22 +01:00
2021-09-24 16:13:35 -07:00
2022-02-01 17:27:05 +01:00
2021-09-16 13:05:42 -07:00
2022-01-27 11:03:00 +01:00
2021-11-18 19:17:14 +01:00
2022-02-01 17:27:07 +01:00
2021-11-18 19:17:02 +01:00
2021-09-14 09:02:50 +02:00
2022-01-27 11:04:15 +01:00
2021-09-13 10:18:28 -07:00
2021-09-17 13:52:17 +01:00
2021-10-28 17:18:55 -07:00
2021-11-21 13:44:14 +01:00
2022-01-20 09:13:14 +01:00
2021-09-20 22:28:47 +02:00
2022-01-27 11:04:44 +01:00
2021-11-18 19:17:14 +01:00
2021-11-25 09:48:45 +01:00
2022-02-01 17:27:01 +01:00
2022-02-01 17:27:01 +01:00
2022-01-27 11:03:52 +01:00
2021-10-07 16:51:57 +02:00
2021-11-18 19:16:58 +01:00
2021-10-01 13:57:57 +02:00
2021-10-18 20:22:03 -10:00
2021-11-12 15:05:48 +01:00
2021-11-18 19:17:12 +01:00
2021-11-18 19:16:01 +01:00
2021-12-08 09:04:47 +01:00
2022-01-27 11:04:02 +01:00
2021-11-18 19:16:45 +01:00
2022-01-27 11:03:21 +01:00
2021-11-21 13:44:12 +01:00
2021-09-09 13:25:49 -07:00
2021-12-29 12:28:54 +01:00
2021-11-18 19:16:41 +01:00
2021-11-25 09:48:34 +01:00
2021-10-18 18:12:09 -04:00
2021-09-22 10:24:01 -04:00
2021-09-08 15:32:35 -07:00
2021-09-15 09:22:35 -06:00
2021-10-18 16:02:30 -05:00
2021-12-29 12:28:43 +01:00
2021-12-14 10:57:15 +01:00
2021-09-13 07:53:27 -10:00