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: <CANn89iK47cLD-vNfRb9gt_V1nzjyLgdDCmoMcXBdaE0z5j4FEw@mail.gmail.com>
Date:   Tue, 4 Apr 2023 03:47:34 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     Kuniyuki Iwashima <kuniyu@...zon.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 net 2/2] ping: Fix potentail NULL deref for /proc/net/icmp.

On Mon, Apr 3, 2023 at 9:51 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> After commit dbca1596bbb0 ("ping: convert to RCU lookups, get rid
> of rwlock"), we use RCU for ping sockets, but we should use spinlock
> for /proc/net/icmp to avoid a potential NULL deref mentioned in
> the previous patch.
>
> Let's go back to using spinlock there.
>
> Note we can convert ping sockets to use hlist instead of hlist_nulls
> because we do not use SLAB_TYPESAFE_BY_RCU for ping sockets.

Yes, this could be done later if we care enough.

>
> Fixes: dbca1596bbb0 ("ping: convert to RCU lookups, get rid of rwlock")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ