Congyu Liu
be1ca30331
net: fix information leakage in /proc/net/ptype
...
commit 47934e06b6 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:15:27 +01:00
..
2021-03-17 16:10:13 +01:00
2021-05-22 10:40:33 +02:00
2021-08-08 08:38:53 +02:00
2020-11-10 10:23:51 +01:00
2021-06-03 08:23:27 +02:00
2021-09-22 11:42:58 +02:00
2020-06-30 15:38:42 -04:00
2020-07-09 09:35:55 +02:00
2021-06-03 08:23:30 +02:00
2021-02-23 13:59:14 +01:00
2021-08-15 13:01:03 +02:00
2021-01-23 15:38:17 +01:00
2021-02-23 13:59:15 +01:00
2020-09-12 11:47:36 +02:00
2022-01-11 13:38:12 +01:00
2022-01-11 13:38:12 +01:00
2020-09-12 11:47:36 +02:00
2020-07-22 09:10:49 +02:00
2020-07-22 09:10:48 +02:00
2021-02-03 23:19:49 +01:00
2021-01-30 13:27:15 +01:00
2021-10-06 10:23:40 +02:00
2021-05-26 11:29:08 +02:00
2021-11-26 11:48:25 +01:00
2021-10-06 10:23:43 +02:00
2020-10-01 20:40:04 +02:00
2020-09-12 11:47:36 +02:00
2021-08-26 08:37:24 -04:00
2021-03-11 13:48:03 +01:00
2020-09-03 11:21:19 +02:00
2021-10-27 09:34:00 +02:00
2021-12-08 08:45:06 +01:00
2021-11-26 11:48:20 +01:00
2020-10-14 09:48:14 +02:00
2021-12-08 08:45:06 +01:00
2020-11-10 10:23:51 +01:00
2021-02-23 13:59:14 +01:00
2021-02-03 23:19:50 +01:00
2020-06-30 15:38:32 -04:00
2021-12-14 10:04:47 +01:00
2020-11-10 10:24:00 +01:00
2021-09-22 11:43:08 +02:00
2020-09-23 08:46:15 +02:00
2021-03-03 17:44:46 +01:00
2020-09-12 11:47:36 +02:00
2021-03-30 14:41:41 +02:00
2021-03-30 14:41:40 +02:00
2020-12-11 13:37:58 +01:00
2021-01-23 15:38:17 +01:00
2021-02-03 23:19:51 +01:00
2020-07-31 16:44:05 +02:00
2021-12-08 08:45:05 +01:00
2021-03-03 17:44:46 +01:00
2021-01-09 13:35:50 +01:00
2020-10-14 09:48:17 +02:00
2021-12-08 08:45:06 +01:00
2021-06-16 11:36:35 +02:00
2021-11-26 11:48:18 +01:00
2020-09-12 11:47:34 +02:00
2021-11-26 11:48:17 +01:00
2021-10-09 13:25:58 +02:00
2021-02-23 13:59:14 +01:00
2022-01-27 08:47:43 +01:00
2021-07-11 12:46:40 +02:00
2020-08-21 11:02:11 +02:00
2021-08-26 08:37:24 -04:00
2022-02-08 18:15:27 +01:00
2021-01-09 13:35:49 +01:00
2020-10-29 09:05:39 +01:00
2021-07-11 12:46:40 +02:00
2021-09-22 11:43:10 +02:00
2020-11-18 18:26:29 +01:00
2021-07-20 16:21:00 +02:00
2020-08-21 11:01:52 +02:00
2022-01-27 08:47:42 +01:00
2022-01-27 08:47:42 +01:00
2021-12-08 08:45:05 +01:00
2021-11-26 11:48:17 +01:00
2020-12-29 13:44:59 +01:00
2020-10-01 20:40:04 +02:00
2021-12-08 08:45:05 +01:00
2021-12-08 08:45:06 +01:00
2021-09-22 11:43:09 +02:00
2021-08-04 11:58:02 +02:00
2021-06-30 08:49:13 -04:00
2021-03-07 11:25:58 +01:00
2020-07-31 16:44:06 +02:00
2021-03-24 10:59:25 +01:00
2020-11-18 18:26:23 +01:00
2022-01-27 08:47:42 +01:00
2020-12-29 13:44:59 +01:00
2020-08-21 11:01:56 +02:00
2021-05-22 10:40:24 +02:00
2020-12-11 13:38:00 +01:00
2021-03-30 14:41:39 +02:00
2020-09-12 11:47:35 +02:00
2020-09-23 08:46:11 +02:00
2021-12-14 10:04:48 +01:00
2020-08-21 11:01:55 +02:00
2021-03-07 11:25:59 +01:00