lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Dec 2020 16:47:02 +0200
From:   Eyal Birger <>
To:     Phil Sutter <>
Cc:     Steffen Klassert <>,,,
        Linux Kernel Network Developers <>,
        Nicolas Dichtel <>
Subject: Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

Hi Phil,

On Mon, Dec 7, 2020 at 4:07 PM Phil Sutter <> wrote:
> With an IPsec tunnel without dedicated interface, netfilter sees locally
> generated packets twice as they exit the physical interface: Once as "the
> inner packet" with IPsec context attached and once as the encrypted
> (ESP) packet.
> With xfrm_interface, the inner packet did not traverse NF_INET_LOCAL_OUT
> hook anymore, making it impossible to match on both inner header values
> and associated IPsec data from that hook.

Why wouldn't locally generated traffic not traverse the
NF_INET_LOCAL_OUT hook via e.g. __ip_local_out() when xmitted on an xfrmi?
I would expect it to appear in netfilter, but without the IPsec
context, as it's not
there yet.

> Fix this by looping packets transmitted from xfrm_interface through
> NF_INET_LOCAL_OUT before passing them on to dst_output(), which makes
> behaviour consistent again from netfilter's point of view.

When an XFRM interface is used when forwarding, why would it be correct
for NF_INET_LOCAL_OUT to observe the inner packet?

What am I missing?


Powered by blists - more mailing lists