Haoze Xie
e196115ec3
netfilter: nf_queue: hold bridge skb->dev while queued
...
br_pass_frame_up() rewrites skb->dev from the ingress port to the bridge
master before queueing bridge LOCAL_IN packets. NFQUEUE only holds
references on state.in/out and bridge physdevs, so a queued bridge
packet can retain a freed bridge master in skb->dev until reinjection.
When the verdict is reinjected later, br_netif_receive_skb() re-enters
the receive path with skb->dev still pointing at the freed bridge master,
triggering a use-after-free.
Store skb->dev in the queue entry, hold a reference on it for the queue
lifetime, and use the saved device when dropping queued packets during
NETDEV_DOWN handling.
Fixes: ac28634456 ("netfilter: bridge: add nf_afinfo to enable queuing to userspace")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com >
Reported-by: Yifan Wu <yifanwucs@gmail.com >
Reported-by: Juefei Pu <tomapufckgml@gmail.com >
Reported-by: Xin Liu <bird@lzu.edu.cn >
Signed-off-by: Haoze Xie <royenheart@gmail.com >
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
2026-05-16 13:23:01 +02:00
..
2026-05-16 13:21:42 +02:00
2026-05-16 12:19:56 +02:00
2026-03-29 11:21:24 -07:00
2026-04-10 12:16:26 +02:00
2025-11-27 23:59:43 +00:00
2026-03-19 10:26:31 +01:00
2026-02-21 17:09:51 -08:00
2026-04-08 07:51:26 +02:00
2026-02-11 19:31:52 -08:00
2026-05-08 01:30:17 +02:00
2026-05-08 01:30:17 +02:00
2026-03-26 13:18:32 +01:00
2026-05-08 01:30:17 +02:00
2023-09-13 21:57:50 +02:00
2026-04-08 07:51:26 +02:00
2026-04-08 07:51:31 +02:00
2026-05-08 01:30:17 +02:00
2026-05-16 12:19:56 +02:00
2026-04-08 07:51:26 +02:00
2023-10-24 13:16:30 +02:00
2026-05-08 01:30:17 +02:00
2026-02-06 20:50:03 -08:00
2026-01-20 16:23:37 +01:00
2026-02-21 01:02:28 -08:00
2026-01-20 16:23:37 +01:00
2026-01-20 16:23:37 +01:00
2026-04-28 17:52:19 -07:00
2026-03-26 13:28:17 +01:00
2026-04-10 12:16:26 +02:00
2026-04-10 12:16:26 +02:00
2022-08-11 16:50:25 +02:00
2026-05-08 01:30:17 +02:00
2026-04-08 07:51:26 +02:00
2026-04-10 12:16:26 +02:00
2026-04-08 07:51:26 +02:00
2026-04-30 00:57:42 +02:00
2026-01-02 12:04:28 -08:00
2026-05-01 01:24:01 +02:00
2024-09-12 15:41:03 +02:00
2026-05-01 12:39:23 +02:00
2026-04-02 11:03:13 -07:00
2026-05-01 01:24:01 +02:00
2026-02-21 01:02:28 -08:00
2024-07-24 20:59:29 +02:00
2024-06-19 18:41:59 +02:00
2026-04-10 12:16:27 +02:00
2026-02-21 01:02:28 -08:00
2026-04-20 23:27:46 +02:00
2026-01-02 12:04:28 -08:00
2026-04-20 23:45:41 +02:00
2022-09-07 16:46:04 +02:00
2022-11-18 02:15:15 +01:00
2022-09-07 16:46:04 +02:00
2026-03-29 11:21:24 -07:00
2026-01-20 16:23:37 +01:00
2026-04-10 12:16:26 +02:00
2023-11-08 16:40:30 +01:00
2026-04-24 20:09:57 +02:00
2026-05-16 13:23:01 +02:00
2026-01-20 16:23:37 +01:00
2026-04-30 08:03:22 +02:00
2026-04-30 17:59:01 +02:00
2026-02-21 17:09:51 -08:00
2025-07-14 15:22:35 +02:00
2026-04-08 07:51:30 +02:00
2026-04-08 07:51:30 +02:00
2026-04-10 12:16:26 +02:00
2026-04-08 07:51:30 +02:00
2026-04-10 12:16:26 +02:00
2026-04-20 23:45:44 +02:00
2026-05-16 13:23:01 +02:00
2026-03-09 18:32:45 -07:00
2026-04-24 20:09:57 +02:00
2026-04-08 07:51:31 +02:00
2026-03-12 12:53:34 -07:00
2023-11-08 13:52:32 +01:00
2026-04-08 07:51:31 +02:00
2026-04-30 08:03:22 +02:00
2026-04-08 07:51:30 +02:00
2026-02-25 19:36:26 -08:00
2023-05-03 13:49:08 +02:00
2026-05-08 01:30:17 +02:00
2026-02-25 19:36:26 -08:00
2026-04-08 07:51:30 +02:00
2026-04-30 17:59:01 +02:00
2026-02-25 19:36:26 -08:00
2026-02-25 19:36:26 -08:00
2026-04-08 07:51:31 +02:00
2026-02-25 19:36:26 -08:00
2026-04-30 00:57:42 +02:00
2026-04-08 07:51:31 +02:00
2026-04-08 07:51:31 +02:00
2026-05-16 13:21:41 +02:00
2026-02-26 10:23:00 -08:00
2026-04-08 07:51:30 +02:00
2026-04-08 07:51:30 +02:00
2026-04-08 07:51:31 +02:00
2026-02-25 19:36:26 -08:00
2026-04-08 07:51:31 +02:00
2026-02-25 19:36:26 -08:00
2026-04-08 07:51:31 +02:00
2026-04-08 07:51:31 +02:00
2026-04-30 17:59:01 +02:00
2026-04-08 07:51:31 +02:00
2026-04-08 07:51:30 +02:00
2026-04-08 07:51:30 +02:00
2026-04-08 07:51:31 +02:00
2026-02-25 19:36:26 -08:00
2026-02-25 19:36:26 -08:00
2026-02-25 19:36:26 -08:00
2024-09-03 10:47:17 +02:00
2026-04-08 07:51:31 +02:00
2025-09-10 20:28:24 +02:00
2026-03-05 13:22:37 +01:00
2026-04-08 07:51:31 +02:00
2025-08-20 13:52:37 +02:00
2026-04-08 07:51:31 +02:00
2026-04-08 07:51:31 +02:00
2026-03-26 12:09:57 -07:00
2026-04-08 07:51:31 +02:00
2026-04-08 07:51:30 +02:00
2026-04-30 17:59:01 +02:00
2026-04-08 07:51:31 +02:00
2026-04-08 07:51:31 +02:00
2026-03-29 11:21:24 -07:00
2026-05-08 01:30:16 +02:00
2026-04-30 08:03:22 +02:00
2025-12-16 11:04:14 -05:00
2026-04-01 11:55:29 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2026-03-09 18:32:45 -07:00
2026-03-09 18:32:45 -07:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2026-04-30 08:03:22 +02:00
2026-04-08 07:51:27 +02:00
2026-04-30 08:03:22 +02:00
2026-04-30 17:59:01 +02:00
2026-04-30 17:59:01 +02:00
2026-04-10 12:16:26 +02:00
2026-03-10 14:10:43 +01:00
2026-02-21 17:09:51 -08:00
2023-02-22 21:25:23 -08:00
2026-02-21 17:09:51 -08:00
2026-04-20 23:27:52 +02:00
2025-05-22 17:16:02 +02:00
2026-04-08 13:33:38 +02:00
2025-07-25 18:40:43 +02:00
2024-10-21 11:31:26 +02:00
2026-04-30 17:59:01 +02:00
2026-04-20 23:27:52 +02:00
2026-04-30 08:03:22 +02:00
2026-04-30 08:03:22 +02:00
2026-02-21 17:09:51 -08:00
2026-04-01 11:55:29 +02:00
2026-02-21 17:09:51 -08:00
2026-04-20 23:27:52 +02:00
2026-02-21 17:09:51 -08:00
2023-03-22 21:48:59 +01:00
2025-03-23 10:53:47 +01:00
2023-08-30 17:34:01 +02:00
2024-10-09 23:20:46 +02:00
2026-04-30 08:03:22 +02:00
2026-04-10 12:16:26 +02:00
2026-02-21 17:09:51 -08:00
2026-04-30 17:59:01 +02:00
2026-04-30 08:03:22 +02:00
2025-05-22 17:16:02 +02:00
2026-03-10 14:10:42 +01:00
2026-02-21 17:09:51 -08:00
2026-03-19 14:16:00 -07:00
2026-04-30 17:59:01 +02:00
2024-10-21 11:31:26 +02:00
2023-08-30 17:34:01 +02:00