diff options
author | Sasha Levin <[email protected]> | 2014-09-13 00:06:30 -0400 |
---|---|---|
committer | David S. Miller <[email protected]> | 2014-09-13 17:37:49 -0400 |
commit | c0d1379a19c3dde3c32be50164997d246241c1e4 (patch) | |
tree | bab2f0bb3c42e17d571f8fcc20bffa5ebd89e2ab /lib/test-string_helpers.c | |
parent | 3fc8867740b4a0bf56f372c6f5ddd14970962fb1 (diff) |
net: bpf: correctly handle errors in sk_attach_filter()
Commit "net: bpf: make eBPF interpreter images read-only" has changed bpf_prog
to be vmalloc()ed but never handled some of the errors paths of the old code.
On error within sk_attach_filter (which userspace can easily trigger), we'd
kfree() the vmalloc()ed memory, and leak the internal bpf_work_struct.
Signed-off-by: Sasha Levin <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions