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