Kyle Zeng
c78b477049
net: require a full socket in sock_confirm_neigh()
...
An skb can retain dst_pending_confirm after its original output and
socket owner have changed. For example, a raw MSG_CONFIRM packet can
cross veth, have a TCP request socket assigned by TPROXY, and be bridged
into gretap. Neighbor output for the outer packet then calls
sock_confirm_neigh() with the request socket in skb->sk.
The helper unconditionally treats a non-NULL skb->sk as a full socket
when accessing sk_dst_pending_confirm. TCP request and TIME_WAIT sockets
do not contain that field. This produces an out-of-bounds four-byte read
and, if the word is nonzero, an out-of-bounds four-byte zero write. A
KASAN-enabled kernel reports:
BUG: KASAN: slab-out-of-bounds in ip_finish_output2+0xc9f/0xd60
Read of size 4 at addr ffff8880bdc3d880 by task tproxy_dst_conf/1771
Require sk_fullsock() before accessing the socket field, moving the
existing helper earlier in the header to make it available here. Keep
neigh_confirm() independent of the socket type so the skb's neighbor
confirmation still works, including for socketless packets. This also
covers the IPv6, VRF, and BPF neighbor-output callers.
Fixes: 4ff0620354 ("net: add dst_pending_confirm flag to skbuff")
Signed-off-by: Kyle Zeng <[email protected] >
Signed-off-by: Eric Dumazet <[email protected] >
Reviewed-by: Kuniyuki Iwashima <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected] >
2026-11-09 18:01:09 -08:00
..
2026-10-29 06:05:56 +00:00
2026-11-02 17:09:03 -05:00
2026-02-21 01:02:28 -08:00
2026-11-09 15:34:30 -08:00
2026-11-03 09:47:33 +01:00
2026-11-05 13:31:10 +01:00
2026-11-03 19:54:29 +01:00
2026-09-23 22:13:17 +02:00
2026-10-15 17:14:29 -07:00
2024-10-24 16:03:40 +02:00
2026-09-07 16:38:37 -07:00
2026-10-15 17:02:21 -07:00
2026-07-06 12:52:01 +02:00
2026-08-10 16:00:19 -07:00
2026-10-20 12:25:31 -07:00
2026-10-15 11:43:01 +02:00
2026-08-17 18:14:52 -07:00
2026-10-21 11:58:21 +02:00
2025-07-02 14:22:02 -07:00
2026-10-01 18:11:09 -07:00
2026-10-07 16:07:03 -07:00
2026-04-23 10:24:02 -07:00
2026-10-08 16:51:28 -07:00
2026-09-02 18:17:47 -07:00
2026-06-10 07:53:26 -07:00
2026-06-30 17:00:03 -07:00
2025-02-27 14:03:14 +01:00
2024-10-02 17:23:23 -04:00
2026-10-01 17:05:03 +02:00
2026-10-13 13:58:14 +02:00
2026-09-19 16:45:00 -07:00
2025-05-30 19:53:51 -07:00
2024-10-02 17:23:23 -04:00
2025-09-14 11:55:04 -07:00
2026-09-16 17:15:29 -07:00
2026-09-16 17:15:29 -07:00
2026-08-11 18:06:30 -07:00
2026-10-20 10:41:40 +02:00
2026-02-28 15:31:35 -08:00
2026-02-28 15:31:34 -08:00
2026-09-18 17:49:09 -07:00
2024-08-26 09:37:23 -07:00
2026-06-21 14:33:05 -07:00
2026-09-23 19:04:47 -07:00
2024-11-13 18:49:50 -08:00
2024-08-26 09:37:23 -07:00
2026-10-12 10:40:32 +02:00
2024-10-11 15:35:05 -07:00
2026-07-01 18:42:34 +02:00
2026-02-10 15:30:11 +01:00
2025-08-26 17:34:31 -07:00
2026-02-21 17:09:51 -08:00
2026-05-11 18:28:08 -07:00
2026-05-08 15:43:29 -07:00
2026-08-06 15:09:23 +02:00
2026-08-06 15:09:23 +02:00
2026-11-09 17:00:32 -08:00
2026-10-13 15:32:47 +02:00
2026-09-18 16:44:08 -07:00
2026-03-04 16:54:09 -08:00
2024-08-26 09:37:23 -07:00
2025-09-11 12:22:38 +02:00
2026-09-28 11:15:14 +02:00
2026-08-31 17:54:45 -07:00
2026-02-24 17:47:27 -08:00
2026-03-05 18:50:05 -08:00
2026-03-02 18:17:17 -08:00
2026-09-07 17:40:26 -07:00
2025-08-26 17:34:31 -07:00
2026-02-03 15:13:24 +01:00
2026-11-02 22:00:27 +01:00
2026-03-26 12:09:57 -07:00
2026-10-05 15:55:24 -07:00
2025-09-23 10:12:15 +02:00
2026-08-20 12:55:31 -07:00
2026-02-13 12:24:05 -08:00
2026-02-24 16:30:40 -08:00
2026-08-13 12:30:27 +02:00
2026-10-28 15:51:38 -07:00
2026-09-18 18:14:12 -07:00
2026-10-16 18:52:34 -07:00
2026-10-07 19:45:43 -07:00
2026-10-19 13:50:54 +02:00
2026-10-28 15:51:38 -07:00
2025-03-21 17:36:49 +08:00
2025-12-10 01:15:27 -08:00
2026-06-15 15:57:31 -07:00
2026-10-22 12:00:05 +02:00
2025-08-13 18:18:33 -07:00
2026-02-02 17:09:11 -08:00
2024-12-06 17:43:08 -08:00
2026-10-01 10:07:32 +02:00
2026-10-01 10:07:32 +02:00
2025-07-02 14:32:30 -07:00
2026-10-13 13:58:15 +02:00
2024-10-02 17:23:23 -04:00
2026-05-13 19:03:05 -07:00
2026-04-20 11:46:57 -07:00
2024-11-09 09:04:54 -08:00
2026-05-04 19:09:41 -07:00
2026-10-16 18:27:23 -07:00
2026-06-09 17:18:51 -07:00
2026-10-07 16:07:03 -07:00
2024-11-09 13:22:57 -08:00
2026-10-07 16:07:04 -07:00
2024-11-30 13:41:50 -08:00
2026-11-09 17:45:23 -08:00
2026-08-17 13:54:16 -07:00
2026-09-29 13:14:20 +02:00
2025-03-12 13:32:35 -07:00
2026-09-30 17:16:05 -07:00
2026-04-09 18:26:28 -07:00
2024-11-21 08:28:08 -08:00
2026-05-14 16:49:26 -07:00
2026-10-21 17:00:00 -07:00
2026-07-30 16:09:22 -07:00
2025-10-20 17:13:40 -07:00
2026-05-08 15:32:59 -07:00
2025-06-13 18:17:08 -07:00
2026-04-22 21:12:47 -07:00
2026-03-02 18:17:17 -08:00
2026-10-15 17:39:30 -07:00
2026-08-27 12:12:36 -07:00
2025-10-16 12:04:47 -07:00
2025-09-18 12:32:06 +02:00
2025-09-14 11:35:17 -07:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2026-11-09 17:12:09 -08:00
2026-04-23 10:24:02 -07:00
2026-10-06 15:56:16 -07:00
2026-03-04 16:54:09 -08:00
2026-03-04 16:54:10 -08:00
2025-04-11 18:58:10 -07:00
2026-06-17 16:01:52 -07:00
2026-09-29 17:49:35 -07:00
2026-01-13 11:54:29 +01:00
2026-10-12 10:58:20 +02:00
2026-03-04 17:44:35 -08:00
2026-10-01 12:58:27 +02:00
2025-11-06 13:38:11 +01:00
2026-05-20 17:13:18 -07:00
2025-09-08 18:06:21 -07:00
2026-11-09 18:01:09 -08:00
2026-10-08 22:21:56 -07:00
2026-03-19 13:14:00 +01:00
2026-03-09 19:31:41 -07:00
2026-06-29 18:14:30 -07:00
2026-04-18 11:10:12 -07:00
2026-11-06 10:30:26 +01:00
2025-07-11 11:00:57 -07:00
2025-08-25 17:53:35 -07:00
2026-06-12 16:43:10 -07:00
2026-03-13 18:57:44 -07:00
2026-04-12 10:54:31 -07:00
2026-05-05 17:47:04 -07:00
2026-10-13 15:32:47 +02:00
2025-11-04 19:10:32 -08:00
2026-09-28 16:48:35 -07:00
2025-07-14 17:19:13 -07:00
2026-11-09 15:34:30 -08:00
2026-08-03 16:43:54 -07:00
2026-09-30 17:39:11 -07:00
2026-11-03 13:20:11 +01:00
2026-10-20 12:38:34 +02:00