Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 6.6 0/2] Set the bpf_net_context before invoking BPF XDP in the TUN driver
@ 2025-02-24 12:00 Ricardo Cañuelo Navarro
  2025-02-24 12:00 ` [PATCH 6.6 1/2] net: Reference bpf_redirect_info via task_struct on PREEMPT_RT Ricardo Cañuelo Navarro
  2025-02-24 12:00 ` [PATCH 6.6 2/2] tun: Assign missing bpf_net_context Ricardo Cañuelo Navarro
  0 siblings, 2 replies; 8+ messages in thread
From: Ricardo Cañuelo Navarro @ 2025-02-24 12:00 UTC (permalink / raw)
  To: stable, bigeasy; +Cc: revest, kernel-dev

A private syzbot instance reported "KASAN: slab-use-after-free Read in
dev_map_enqueue" under some runtime environments.

Upstream patch fecef4cd42c6 ("tun: Assign missing bpf_net_context")
fixes the issue. In order to bring this patch to stable v6.6 it's also
necessary to bring upstream patch 401cb7dae813 ("net: Reference
bpf_redirect_info via task_struct on PREEMPT_RT.") as a dependency.

Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>

---
Sebastian Andrzej Siewior (2):
      net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.
      tun: Assign missing bpf_net_context.

 drivers/net/tun.c      |  7 +++++++
 include/linux/filter.h | 56 +++++++++++++++++++++++++++++++++++++++++---------
 include/linux/sched.h  |  3 +++
 kernel/bpf/cpumap.c    |  3 +++
 kernel/bpf/devmap.c    |  9 +++++++-
 kernel/fork.c          |  1 +
 net/bpf/test_run.c     | 11 +++++++++-
 net/core/dev.c         | 33 ++++++++++++++++++++++++++++-
 net/core/filter.c      | 41 +++++++++++-------------------------
 net/core/lwt_bpf.c     |  3 +++
 10 files changed, 125 insertions(+), 42 deletions(-)
---
base-commit: c0249d3a0c3cf082d56f4285647ddba19ef604a7
change-id: 20250224-20250204-kasan-slab-use-after-free-read-in-dev_map_enqueue__submit-b907af839805

Best regards,
-- 
Ricardo Cañuelo Navarro <rcn@igalia.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-25 16:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 12:00 [PATCH 6.6 0/2] Set the bpf_net_context before invoking BPF XDP in the TUN driver Ricardo Cañuelo Navarro
2025-02-24 12:00 ` [PATCH 6.6 1/2] net: Reference bpf_redirect_info via task_struct on PREEMPT_RT Ricardo Cañuelo Navarro
2025-02-24 13:55   ` Greg KH
2025-02-24 14:21     ` Ricardo Cañuelo Navarro
2025-02-24 14:24     ` Ricardo Cañuelo Navarro
2025-02-25 16:13   ` Sasha Levin
2025-02-24 12:00 ` [PATCH 6.6 2/2] tun: Assign missing bpf_net_context Ricardo Cañuelo Navarro
2025-02-25 16:13   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox