Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: bpf: Make sure all tail call callers use cgroup storage if the owner does
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 30f0920
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 30f0920
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8f7aa3d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 835a507
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 861111b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 861111b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

…does

Mitigate a possible NULL pointer dereference in bpf_get_local_storage()
by requiring all callers to use cgroup storage if the owner does.

Cgroup storage is allocated lazily when attaching a cgroup bpf program.
With tail call, it is possible for a callee BPF program to see a NULL
storage pointer if the caller prorgam does not use cgroup storage.

Reported-by: Yinhao Hu <[email protected]>
Reported-by: Kaiyan Mei <[email protected]>
Reported-by: Dongliang Mu <[email protected]>
Closes: https://lore.kernel.org/bpf/[email protected]/
Signed-off-by: Amery Hung <[email protected]>
Make sure that if the owner of a program array map uses cgroup storage,
(1) all callers must use cgroup storage and (2) the cgroup storage map
used by all callers and callees must be the owner's cgroup storage map.

Signed-off-by: Amery Hung <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 861111b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030226
version: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants