Sasha Levin c0d1379a19 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 <sasha.levin@oracle.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-13 17:37:49 -04:00
..
2014-09-10 12:40:10 -07:00
2014-07-01 23:46:21 -07:00
2014-08-22 12:23:11 -07:00
2014-09-10 12:40:10 -07:00
2013-09-23 16:52:45 -04:00
2014-06-04 22:46:38 -07:00
2014-09-07 16:07:25 -07:00
2014-09-01 21:49:08 -07:00
2014-09-13 12:30:26 -04:00
2014-08-13 18:13:19 -06:00
2014-09-10 14:00:58 -07:00
2013-11-21 13:09:42 -05:00