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: <alpine.LSU.2.20.1704061057580.28004@cbobk.fhfr.pm>
Date:   Thu, 6 Apr 2017 10:58:16 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Cong Wang <xiyou.wangcong@...il.com>
cc:     netdev@...r.kernel.org, dvyukov@...gle.com, edumazet@...gle.com
Subject: Re: [Patch net] net_sched: check noop_qdisc before
 qdisc_hash_add()

On Tue, 4 Apr 2017, Cong Wang wrote:

> Dmitry reported a crash when injecting faults in
> attach_one_default_qdisc() and dev->qdisc is still
> a noop_disc, the check before qdisc_hash_add() fails
> to catch it because it tests NULL. We should test
> against noop_qdisc since it is the default qdisc
> at this point.
> 
> Fixes: 59cc1f61f09c ("net: sched: convert qdisc linked list to hashtable")
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Jiri Kosina <jkosina@...e.cz>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>

Acked-by: Jiri Kosina <jkosina@...e.cz>

Thanks.

> ---
>  net/sched/sch_generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index b052b27..1a2f9e9 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -794,7 +794,7 @@ static void attach_default_qdiscs(struct net_device *dev)
>  		}
>  	}
>  #ifdef CONFIG_NET_SCHED
> -	if (dev->qdisc)
> +	if (dev->qdisc != &noop_qdisc)
>  		qdisc_hash_add(dev->qdisc);
>  #endif
>  }
> -- 
> 2.5.5
> 

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ