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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170629.155528.1025956782358604257.davem@davemloft.net>
Date:   Thu, 29 Jun 2017 15:55:28 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     mkubecek@...e.cz
Cc:     edumazet@...gle.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in
 napi_frags_finish()

From: Michal Kubecek <mkubecek@...e.cz>
Date: Thu, 29 Jun 2017 11:13:36 +0200 (CEST)

> Recently I started seeing warnings about pages with refcount -1. The
> problem was traced to packets being reused after their head was merged into
> a GRO packet by skb_gro_receive(). While bisecting the issue pointed to
> commit c21b48cc1bbf ("net: adjust skb->truesize in ___pskb_trim()") and
> I have never seen it on a kernel with it reverted, I believe the real
> problem appeared earlier when the option to merge head frag in GRO was
> implemented.
> 
> Handling NAPI_GRO_FREE_STOLEN_HEAD state was only added to GRO_MERGED_FREE
> branch of napi_skb_finish() so that if the driver uses napi_gro_frags()
> and head is merged (which in my case happens after the skb_condense()
> call added by the commit mentioned above), the skb is reused including the
> head that has been merged. As a result, we release the page reference
> twice and eventually end up with negative page refcount.
> 
> To fix the problem, handle NAPI_GRO_FREE_STOLEN_HEAD in napi_frags_finish()
> the same way it's done in napi_skb_finish().
> 
> Fixes: d7e8883cfcf4 ("net: make GRO aware of skb->head_frag")
> Signed-off-by: Michal Kubecek <mkubecek@...e.cz>

Applied and queued up for -stable, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ