2019-10-07 21:08:55

by Yizhuo Zhai

[permalink] [raw]
Subject: Potential NULL pointer deference in net: sched

Hi All:

net/sched/sch_mq.c:
Inside function mq_dump_class(), mq_queue_get() could return NULL,
however, the return value of dev_queue is not checked and get used.
This could potentially be unsafe.


--
Kind Regards,

Yizhuo Zhai

Computer Science, Graduate Student
University of California, Riverside


2019-10-07 21:22:51

by Eric Dumazet

[permalink] [raw]
Subject: Re: Potential NULL pointer deference in net: sched



On 10/7/19 2:08 PM, Yizhuo Zhai wrote:
> Hi All:
>
> net/sched/sch_mq.c:
> Inside function mq_dump_class(), mq_queue_get() could return NULL,
> however, the return value of dev_queue is not checked and get used.
> This could potentially be unsafe.
>
>

Not really.

mq_dump_class() is called by a layer that made sure the @cl argument
was not complete garbage.