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: <CAEoi9W7ni8r6yZY6okZb3JHLHHbvXOtJmB9VXurykx0Nuio0LQ@mail.gmail.com>
Date: Tue, 2 Sep 2025 08:50:38 -0400
From: Dan Cross <crossd@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, netdev@...r.kernel.org, 
	eric.dumazet@...il.com, Bernard Pidoux <f6bvp@...e.fr>, Joerg Reuter <jreuter@...na.de>, 
	linux-hams@...r.kernel.org, David Ranch <dranch@...nnet.net>, 
	Folkert van Heusden <folkert@...heusden.com>
Subject: Re: [PATCH net] ax25: properly unshare skbs in ax25_kiss_rcv()

On Tue, Sep 2, 2025 at 8:46 AM Eric Dumazet <edumazet@...gle.com> wrote:
> Bernard Pidoux reported a regression apparently caused by commit
> c353e8983e0d ("net: introduce per netns packet chains").
>
> skb->dev becomes NULL and we crash in __netif_receive_skb_core().
>
> Before above commit, different kind of bugs or corruptions could happen
> without a major crash.
>
> But the root cause is that ax25_kiss_rcv() can queue/mangle input skb
> without checking if this skb is shared or not.
>
> Many thanks to Bernard Pidoux for his help, diagnosis and tests.
>
> We had a similar issue years ago fixed with commit 7aaed57c5c28
> ("phonet: properly unshare skbs in phonet_rcv()").

Please mention the analysis done here in the change description:
https://lore.kernel.org/linux-hams/CAEoi9W4FGoEv+2FUKs7zc=XoLuwhhLY8f8t_xQ6MgTJyzQPxXA@mail.gmail.com/#R

Reviewed-by: Dan Cross <crossd@...il.com>

> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reported-by: Bernard Pidoux <f6bvp@...e.fr>
> Closes: https://lore.kernel.org/netdev/1713f383-c538-4918-bc64-13b3288cd542@free.fr/
> Tested-by: Bernard Pidoux <f6bvp@...e.fr>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Joerg Reuter <jreuter@...na.de>
> Cc: linux-hams@...r.kernel.org
> Cc: David Ranch <dranch@...nnet.net>
> Cc: Dan Cross <crossd@...il.com>
> Cc: Folkert van Heusden <folkert@...heusden.com>
> ---
>  net/ax25/ax25_in.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c
> index 1cac25aca637..f2d66af86359 100644
> --- a/net/ax25/ax25_in.c
> +++ b/net/ax25/ax25_in.c
> @@ -433,6 +433,10 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
>  int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev,
>                   struct packet_type *ptype, struct net_device *orig_dev)
>  {
> +       skb = skb_share_check(skb, GFP_ATOMIC);
> +       if (!skb)
> +               return NET_RX_DROP;
> +
>         skb_orphan(skb);
>
>         if (!net_eq(dev_net(dev), &init_net)) {
> --
> 2.51.0.318.gd7df087d1a-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ