linux_dsm_epyc7002/include
Liping Zhang 9338d7b441 netfilter: nfnl_cthelper: reject del request if helper obj is in use
We can still delete the ct helper even if it is in use, this will cause
a use-after-free error. In more detail, I mean:
  # nfct helper add ssdp inet udp
  # iptables -t raw -A OUTPUT -p udp -j CT --helper ssdp
  # nfct helper delete ssdp //--> oops, succeed!
  BUG: unable to handle kernel paging request at 000026ca
  IP: 0x26ca
  [...]
  Call Trace:
   ? ipv4_helper+0x62/0x80 [nf_conntrack_ipv4]
   nf_hook_slow+0x21/0xb0
   ip_output+0xe9/0x100
   ? ip_fragment.constprop.54+0xc0/0xc0
   ip_local_out+0x33/0x40
   ip_send_skb+0x16/0x80
   udp_send_skb+0x84/0x240
   udp_sendmsg+0x35d/0xa50

So add reference count to fix this issue, if ct helper is used by
others, reject the delete request.

Apply this patch:
  # nfct helper delete ssdp
  nfct v1.4.3: netlink error: Device or resource busy

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2017-05-15 12:42:29 +02:00
..
acpi IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
asm-generic IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
clocksource
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-05-03 08:50:52 -07:00
drm mm, vmalloc: use __GFP_HIGHMEM implicitly 2017-05-08 17:15:13 -07:00
dt-bindings ARM: 64-bit DT updates 2017-05-09 10:07:33 -07:00
keys
kvm * ARM: HYP mode stub supports kexec/kdump on 32-bit; improved PMU 2017-05-08 12:37:56 -07:00
linux xdp: refine xdp api with regards to generic xdp 2017-05-11 21:30:57 -04:00
math-emu
media
memory
misc
net netfilter: nfnl_cthelper: reject del request if helper obj is in use 2017-05-15 12:42:29 +02:00
pcmcia
ras
rdma Updates #2 for 4.12 kernel merge window 2017-05-08 20:07:29 -07:00
rxrpc
scsi SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
soc ARM: SoC driver updates 2017-05-09 10:01:15 -07:00
sound ASoC: Updates for v4.12 2017-05-02 08:25:25 +02:00
target
trace IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
uapi xdp: refine xdp api with regards to generic xdp 2017-05-11 21:30:57 -04:00
video main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
xen xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
Kbuild