lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: sched: sch_teql: fix null-pointer dereference
From
Date


On 4/8/21 5:14 PM, Pavel Tikhomirov wrote:
> Reproduce:
>
> modprobe sch_teql
> tc qdisc add dev teql0 root teql0
>
> This leads to (for instance in Centos 7 VM) OOPS:
>
>
>
> Null pointer dereference happens on master->slaves dereference in
> teql_destroy() as master is null-pointer.
>
> When qdisc_create() calls teql_qdisc_init() it imediately fails after
> check "if (m->dev == dev)" because both devices are teql0, and it does
> not set qdisc_priv(sch)->m leaving it zero on error path, then
> qdisc_create() imediately calls teql_destroy() which does not expect
> zero master pointer and we get OOPS.
>
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
> ---

This makes sense, thanks !

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

I would think bug origin is

Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation")

Can you confirm you have this backported to 3.10.0-1062.7.1.el7.x86_64 ?


\
 
 \ /
  Last update: 2021-04-08 17:26    [W:0.038 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site