lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 13 Nov 2019 09:10:21 +0100
From:   Steffen Klassert <steffen.klassert@...unet.com>
To:     Xiaodong Xu <stid.smth@...il.com>
CC:     <herbert@...dor.apana.org.au>, <davem@...emloft.net>,
        <chenborfc@....com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH v3] xfrm: release device reference for invalid state

On Mon, Nov 11, 2019 at 03:05:46PM -0800, Xiaodong Xu wrote:
> An ESP packet could be decrypted in async mode if the input handler for
> this packet returns -EINPROGRESS in xfrm_input(). At this moment the device
> reference in skb is held. Later xfrm_input() will be invoked again to
> resume the processing.
> If the transform state is still valid it would continue to release the
> device reference and there won't be a problem; however if the transform
> state is not valid when async resumption happens, the packet will be
> dropped while the device reference is still being held.
> When the device is deleted for some reason and the reference to this
> device is not properly released, the kernel will keep logging like:
> 
> unregister_netdevice: waiting for ppp2 to become free. Usage count = 1
> 
> The issue is observed when running IPsec traffic over a PPPoE device based
> on a bridge interface. By terminating the PPPoE connection on the server
> end for multiple times, the PPPoE device on the client side will eventually
> get stuck on the above warning message.
> 
> This patch will check the async mode first and continue to release device
> reference in async resumption, before it is dropped due to invalid state.
> 
> v2: Do not assign address family from outer_mode in the transform if the
> state is invalid
> 
> v3: Release device reference in the error path instead of jumping to resume
> 
> Fixes: 4ce3dbe397d7b ("xfrm: Fix xfrm_input() to verify state is valid when (encap_type < 0)")
> Signed-off-by: Xiaodong Xu <stid.smth@...il.com>
> Reported-by: Bo Chen <chenborfc@....com>
> Tested-by: Bo Chen <chenborfc@....com>

Patch applied, thanks a lot!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ