[PATCH bpf v4 0/4] Fixes for bpf link update

Pu Lehui posted 4 patches 4 days, 12 hours ago
There is a newer version of this series
kernel/bpf/cgroup.c        | 44 +++++++++++++++++++++++++++++++++++++-
kernel/bpf/mprog.c         | 15 ++++++++-----
kernel/bpf/net_namespace.c | 14 +++++++-----
kernel/bpf/syscall.c       | 27 +++++++++++++++++++----
4 files changed, 85 insertions(+), 15 deletions(-)
[PATCH bpf v4 0/4] Fixes for bpf link update
Posted by Pu Lehui 4 days, 12 hours ago
This patch series addresses a few concurrency UAF issues within bpf link update.

v4:
- Add new fix for UAF due to missing link type check in mprog. (Sashiko)
- Add new fix for UAF in bpf_netns_link_update_prog. (Sashiko)
- Include the storage and flags rollbacks to patch4 for sake of code rigor,
  as it's hard to make update_effective_progs fail in __cgroup_bpf_attach.

v3: https://lore.kernel.org/bpf/20260720033055.1215477-1-pulehui@huaweicloud.com
- Add new fix for UAF issue when reading bpf link info. (Sashiko)
- Add new fix for storage not restored when update_effective_progs
  failed. (Sashiko)

v2: https://lore.kernel.org/bpf/20260717073343.958862-1-pulehui@huaweicloud.com
- Fix invalid access for in-place update when storage changed. (Sashiko)

v1: https://lore.kernel.org/bpf/20260714014659.401063-1-pulehui@huaweicloud.com

Pu Lehui (4):
  bpf: Fix potential UAF in bpf_netns_link_update_prog
  bpf: Fix UAF due to missing link type check in mprog
  bpf: Fix potential UAF when reading bpf link info
  bpf, cgroup: Fix storage null-ptr-deref after replacing prog

 kernel/bpf/cgroup.c        | 44 +++++++++++++++++++++++++++++++++++++-
 kernel/bpf/mprog.c         | 15 ++++++++-----
 kernel/bpf/net_namespace.c | 14 +++++++-----
 kernel/bpf/syscall.c       | 27 +++++++++++++++++++----
 4 files changed, 85 insertions(+), 15 deletions(-)

-- 
2.34.1