]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_log: incorrect offset to network header
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 5 Jul 2022 08:26:15 +0000 (10:26 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 9 Jul 2022 07:55:43 +0000 (09:55 +0200)
commitf74897c32f93782eccbf3754b6b155a6559b56ff
tree334ddb11e408b95bc8f44e8daac2284abce96aa3
parent609703e2cff5a639effc5eb59da9925a6e0ddc70
netfilter: nf_log: incorrect offset to network header

NFPROTO_ARP is expecting to find the ARP header at the network offset.

In the particular case of ARP, HTYPE= field shows the initial bytes of
the ethernet header destination MAC address.

 netdev out: IN= OUT=bridge0 MACSRC=c2:76:e5:71:e1:de MACDST=36:b0:4a:e2:72:ea MACPROTO=0806 ARP HTYPE=14000 PTYPE=0x4ae2 OPCODE=49782

NFPROTO_NETDEV egress hook is also expecting to find the IP headers at
the network offset.

Fixes: 363ce390b061 ("netfilter: add generic ARP packet logger")
Reported-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_log_syslog.c