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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJKB7_ZZx7ezakK03jjeYV-FkhuJU6ir8-h+XDGr2=qmA@mail.gmail.com>
Date: Mon, 26 Jun 2023 19:33:37 +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, 
	syzbot+5da61cf6a9bc1902d422@...kaller.appspotmail.com
Subject: Re: [PATCH v2 net] netlink: Add __sock_i_ino() for __netlink_diag_dump().

On Mon, Jun 26, 2023 at 6:43 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> syzbot reported a warning in __local_bh_enable_ip(). [0]
>
> Commit 8d61f926d420 ("netlink: fix potential deadlock in
> netlink_set_err()") converted read_lock(&nl_table_lock) to
> read_lock_irqsave() in __netlink_diag_dump() to prevent a deadlock.
>
> However, __netlink_diag_dump() calls sock_i_ino() that uses
> read_lock_bh() and read_unlock_bh().  If CONFIG_TRACE_IRQFLAGS=y,
> read_unlock_bh() finally enables IRQ even though it should stay
> disabled until the following read_unlock_irqrestore().
>
> Using read_lock() in sock_i_ino() would trigger a lockdep splat
> in another place that was fixed in commit f064af1e500a ("net: fix
> a lockdep splat"), so let's add __sock_i_ino() that would be safe
> to use under BH disabled.
>

> Fixes: 8d61f926d420 ("netlink: fix potential deadlock in netlink_set_err()")
> Reported-by: syzbot+5da61cf6a9bc1902d422@...kaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?extid=5da61cf6a9bc1902d422
> Suggested-by: Eric Dumazet <edumazet@...gle.com>
> 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