]> git.ipfire.org Git - thirdparty/ulogd2.git/commit
ulogd: fix crash when ipv4 packet is truncated
authorLiping Zhang <liping.zhang@spreadtrum.com>
Tue, 11 Oct 2016 14:22:27 +0000 (22:22 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Oct 2016 15:32:36 +0000 (17:32 +0200)
commit62064f6a9e054739ecbdda010dbe9c3fd69bbaa2
tree8c0f31f38db64613c748cd8b559ff398e6f837a1
parent2c3dbe92b5eab4702ced403e4f6c030249a308c2
ulogd: fix crash when ipv4 packet is truncated

If ipv4 packet is truncated, we should not try to dereference the
iph pointer. Otherwise, if the user add such iptables rules
"-j NFLOG --nflog-size 0", we will dereference the NULL pointer
and crash may happen.

Reported-by: Chris Caputo <ccaputo@alt.net>
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
filter/raw2packet/ulogd_raw2packet_BASE.c