Commit 4568af1
bpf: Disallow tail call to programs that use cgroup storage
Mitigate a possible NULL pointer dereference in bpf_get_local_storage()
by disallowing tail call to programs that use cgroup storage. 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]>1 parent ad17a83 commit 4568af1
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
| 895 | + | |
895 | 896 | | |
896 | | - | |
| 897 | + | |
897 | 898 | | |
898 | 899 | | |
899 | 900 | | |
| |||
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
909 | 918 | | |
910 | 919 | | |
911 | 920 | | |
| |||
0 commit comments