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: <3ad39534-400a-8d4e-ac50-94eb5655e565@gmail.com>
Date:   Fri, 6 Jul 2018 07:47:04 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Mark Rutland <mark.rutland@....com>, linux-kernel@...r.kernel.org
Cc:     Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        "David S . Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        netdev@...r.kernel.org
Subject: Re: [PATCH] ipv4: fib: avoid NULL dereference



On 07/06/2018 07:28 AM, Mark Rutland wrote:
> In tnode_free() we iterate over a callback_head list with a while loop.
> At the start of the loop body we generate the next head pointer, and at
> the end of the loop body we generate the tn pointer for the next
> iteration of the loop by using container_of() on the head pointer to
> find the tnode, and deriving the kv pointer from this.
> 
> In the final iteration of the loop, this means that we derive a pointer
> from NULL, which is undefined behaviour, which UBSAN detects:

There is no dereference, your patch title is misleading.

UBSAN might be fooled, not the C compiler.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ