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: <Y1ZNs3w1ymYbjM9f@unreal>
Date:   Mon, 24 Oct 2022 11:32:51 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        johannes@...solutions.net
Subject: Re: [PATCH -next] rfkill: replace BUG_ON() with WARN_ON() in core.c

On Mon, Oct 24, 2022 at 09:58:59AM +0800, Yang Yingliang wrote:
> 
> On 2022/10/23 16:16, Leon Romanovsky wrote:
> > On Fri, Oct 21, 2022 at 09:57:38PM +0800, Yang Yingliang wrote:
> > > Replace BUG_ON() with WARN_ON() to handle fault more gracefully.
> > > 
> > > Suggested-by: Johannes Berg <johannes@...solutions.net>
> > > Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> > > ---
> > >   net/rfkill/core.c | 25 ++++++++++++++++---------
> > >   1 file changed, 16 insertions(+), 9 deletions(-)
> > Please add changelog and version numbers when you set your series.
> > 
> > The same comment as https://lore.kernel.org/all/Y1T3a1y/pWdbt2ow@unreal
> The link is unreachable.

Try this https://lore.kernel.org/netdev/Y1T3a1y%2FpWdbt2ow@unreal/

> > or you should delete BUG_ONs completely or simply replace them with WARN_ONs.
> > 
> > There is no need in all these if (...).
> If remove BUG_ONs or not use if (...), it may lead null-ptr-deref, it's same
> as
> using BUG_ON(), which leads system crash.

May or will? Do you have crash report in hand?

This is rfkill API and an expectation is to have valid struct rfkill *rfkill.
Callers shouldn't call to these API functions if they know what rfkill is NULL.

Thanks

> 
> Thanks,
> Yang
> > 
> > Thanks
> > .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ