Ignacy Gawędzki
2ba90f19c0
netfilter: fix regression in looped (broad|multi)cast's MAC handling
...
[ Upstream commit ebb966d3bd ]
In commit 5648b5e116 ("netfilter: nfnetlink_queue: fix OOB when mac
header was cleared"), the test for non-empty MAC header introduced in
commit 2c38de4c1f ("netfilter: fix looped (broad|multi)cast's MAC
handling") has been replaced with a test for a set MAC header.
This breaks the case when the MAC header has been reset (using
skb_reset_mac_header), as is the case with looped-back multicast
packets. As a result, the packets ending up in NFQUEUE get a bogus
hwaddr interpreted from the first bytes of the IP header.
This patch adds a test for a non-empty MAC header in addition to the
test for a set MAC header. The same two tests are also implemented in
nfnetlink_log.c, where the initial code of commit 2c38de4c1f
("netfilter: fix looped (broad|multi)cast's MAC handling") has not been
touched, but where supposedly the same situation may happen.
Fixes: 5648b5e116 ("netfilter: nfnetlink_queue: fix OOB when mac header was cleared")
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr >
Reviewed-by: Florian Westphal <fw@strlen.de >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-12-29 12:20:44 +01:00
..
2021-10-06 15:31:27 +02:00
2021-12-01 09:27:41 +01:00
2019-06-04 08:02:34 +02:00
2021-10-27 09:53:14 +02:00
2018-08-03 21:12:12 +02:00
2019-01-22 21:40:29 +01:00
2018-03-20 13:44:14 +01:00
2018-06-28 22:21:32 +09:00
2021-09-03 09:58:00 +02:00
2018-03-20 13:44:14 +01:00
2018-08-03 18:37:55 +02:00
2018-04-17 10:59:43 +02:00
2019-09-21 07:17:01 +02:00
2019-06-15 11:54:05 +02:00
2018-08-03 18:37:55 +02:00
2018-04-24 10:29:14 +02:00
2018-03-30 11:41:18 -04:00
2021-07-28 11:13:45 +02:00
2020-06-03 08:19:49 +02:00
2020-01-14 20:07:08 +01:00
2018-09-11 01:30:25 +02:00
2019-04-17 08:38:46 +02:00
2018-09-11 01:30:25 +02:00
2018-09-11 01:30:25 +02:00
2020-09-17 13:45:24 +02:00
2020-10-30 10:38:24 +01:00
2018-09-11 01:30:25 +02:00
2019-05-16 19:41:24 +02:00
2018-04-24 10:29:14 +02:00
2019-01-13 09:50:57 +01:00
2018-05-06 21:51:37 -04:00
2018-03-30 11:41:18 -04:00
2021-05-22 10:59:47 +02:00
2018-04-24 10:29:14 +02:00
2018-08-07 17:14:15 +02:00
2018-03-20 13:44:14 +01:00
2020-10-30 10:38:24 +01:00
2021-02-23 15:00:57 +01:00
2018-04-24 10:28:45 +02:00
2020-04-02 15:28:19 +02:00
2018-05-23 09:14:05 +02:00
2020-10-29 09:55:15 +01:00
2018-03-27 13:18:09 -04:00
2018-06-26 16:48:40 +02:00
2021-01-19 18:22:38 +01:00
2018-03-20 13:44:14 +01:00
2018-04-24 10:29:12 +02:00
2018-03-20 13:44:14 +01:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2020-05-14 07:57:23 +02:00
2018-04-24 10:29:12 +02:00
2018-05-29 00:25:40 +02:00
2019-12-05 09:20:31 +01:00
2020-01-04 19:13:21 +01:00
2021-06-30 08:48:17 -04:00
2020-12-11 13:25:04 +01:00
2019-04-05 22:33:00 +02:00
2018-07-06 19:31:53 +02:00
2018-08-16 19:37:00 +02:00
2021-06-10 13:24:05 +02:00
2019-04-17 08:38:46 +02:00
2021-12-29 12:20:44 +01:00
2021-05-22 10:59:44 +02:00
2021-12-29 12:20:44 +01:00
2020-09-09 19:04:26 +02:00
2020-01-12 12:17:09 +01:00
2018-08-16 19:37:03 +02:00
2020-01-12 12:17:09 +01:00
2019-11-24 08:21:03 +01:00
2019-10-29 09:19:34 +01:00
2018-06-03 00:02:11 +02:00
2018-08-29 13:04:38 +02:00
2021-02-03 23:23:25 +01:00
2021-08-26 08:36:49 -04:00
2020-01-27 14:50:43 +01:00
2020-10-30 10:38:24 +01:00
2019-08-16 10:12:44 +02:00
2019-05-02 09:58:50 +02:00
2021-04-28 13:16:50 +02:00
2018-06-07 16:14:00 -04:00
2019-10-11 18:21:16 +02:00
2018-07-30 11:52:02 +02:00
2021-08-04 12:23:46 +02:00
2018-11-27 16:13:02 +01:00
2019-05-02 09:58:51 +02:00
2021-07-20 16:15:50 +02:00
2020-09-09 19:04:25 +02:00
2020-01-12 12:17:09 +01:00
2019-11-20 18:46:50 +01:00
2018-04-27 00:00:55 +02:00
2018-08-16 19:36:59 +02:00
2021-05-22 10:59:44 +02:00
2020-05-20 08:18:44 +02:00
2019-10-01 08:26:12 +02:00
2021-07-20 16:15:50 +02:00
2020-03-18 07:14:24 +01:00
2018-07-16 17:51:48 +02:00
2021-04-16 11:49:31 +02:00
2018-06-19 10:43:55 -04:00
2019-04-20 09:16:00 +02:00
2018-08-24 09:58:16 +02:00
2018-08-23 20:26:53 +02:00
2018-07-30 14:07:09 +02:00
2018-06-12 19:35:52 +02:00
2018-08-07 17:14:15 +02:00
2020-02-28 16:39:00 +01:00
2018-11-27 16:13:03 +01:00
2018-03-05 23:15:50 +01:00
2018-11-13 11:08:20 -08:00
2018-04-24 10:29:12 +02:00
2019-09-21 07:16:55 +02:00
2018-04-19 13:02:44 +02:00
2018-07-30 14:07:11 +02:00
2018-06-28 22:21:32 +09:00
2019-09-21 07:17:01 +02:00
2018-03-05 23:15:44 +01:00
2021-01-12 20:10:24 +01:00
2021-02-23 15:00:57 +01:00
2018-04-24 10:29:12 +02:00
2021-05-22 10:59:43 +02:00
2018-06-06 14:00:54 +02:00
2018-09-28 14:47:41 +02:00
2018-03-30 11:04:12 +02:00
2019-03-13 14:02:40 -07:00
2018-03-20 13:44:14 +01:00
2018-07-20 22:28:28 -07:00