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: <20210607083325.1a68e8e6@hermes.local>
Date:   Mon, 7 Jun 2021 08:33:25 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     13145886936@....com
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, gushengxian <gushengxian@...ong.com>
Subject: Re: [PATCH] vlan: Avoid crashing the kernel

On Sun,  6 Jun 2021 20:08:39 -0700
13145886936@....com wrote:

> From: gushengxian <gushengxian@...ong.com>
> 
> Avoid crashing the kernel, try using WARN_ON & recovery code
> rather than BUG() or BUG_ON().
> 
> Signed-off-by: gushengxian <gushengxian@...ong.com>
> ---
>  net/8021q/vlan.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index 4cdf8416869d..6e784fd8795b 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -97,7 +97,7 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
>  	ASSERT_RTNL();
>  
>  	vlan_info = rtnl_dereference(real_dev->vlan_info);
> -	BUG_ON(!vlan_info);
> +	WARN_ON(!vlan_info);
>  
>  	grp = &vlan_info->grp;

NACK

You change turns bug on into warning and crash from null pointer dereference.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ