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]
Message-ID: <CANn89iK+DciFiUwPjQv5SSj_wp+CjiPtG5GO8bBKkkyrqDrNxg@mail.gmail.com>
Date:   Mon, 10 Apr 2017 14:38:02 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Christian Lamparter <chunkeey@...glemail.com>
Cc:     Myungho Jung <mhjungk@...il.com>, netdev <netdev@...r.kernel.org>,
        David Miller <davem@...hat.com>, linux-wireless@...r.kernel.org
Subject: Re: [PATCH] p54: add null pointer check before releasing socket buffer

On Mon, Apr 10, 2017 at 2:22 PM, Christian Lamparter
<chunkeey@...glemail.com> wrote:

> Well, the patch could be as simple as this:
> ---
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 7869ae3837ca..44f7d5a1c67c 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2450,6 +2450,9 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason)
>  {
>         unsigned long flags;
>
> +       if (!skb)
> +               return;
> +
>         if (likely(atomic_read(&skb->users) == 1)) {
>                 smp_rmb();
>                 atomic_set(&skb->users, 0);
> ---
>
> The question is: would David or Eric support the change. Any comments,
> what's the prefered solution? Just patch __dev_kfree_skb_irq to make
> it consistent with *kfree*, or patch the driver? I'm fine either way,
> but I would prefere patching __dev_kfree_skb_irq.

This is fine, same check happens in consume_skb()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ