]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 1 Nov 2018 23:14:00 +0000 (00:14 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 3 Nov 2018 12:28:03 +0000 (13:28 +0100)
commit05c3f4edceb9bd9ce015f4d89303020a876b059a
tree9d7f7ce50406f63272a4c6603334578db097b569
parent8dd12db7bb8c59a049acb673e47a249cb1917285
netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr

Otherwise, we hit a NULL pointer deference since handlers always assume
default timeout policy is passed.

  netlink: 24 bytes leftover after parsing attributes in process `syz-executor2'.
  kasan: CONFIG_KASAN_INLINE enabled
  kasan: GPF could be caused by NULL-ptr deref or user memory access
  general protection fault: 0000 [#1] PREEMPT SMP KASAN
  CPU: 0 PID: 9575 Comm: syz-executor1 Not tainted 4.19.0+ #312
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
  RIP: 0010:icmp_timeout_obj_to_nlattr+0x77/0x170 net/netfilter/nf_conntrack_proto_icmp.c:297

Fixes: e416f5d68f4c ("netfilter: conntrack: remove get_timeout() indirection")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_cttimeout.c