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  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]
Date:   Wed, 15 Jan 2020 07:56:35 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Davide Caratti <dcaratti@...hat.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] net/sched: act_ife: initalize ife->metalist earlier

On Wed, Jan 15, 2020 at 1:14 AM Davide Caratti <dcaratti@...hat.com> wrote:
>
> On Tue, 2020-01-14 at 13:51 -0800, Eric Dumazet wrote:
> > It seems better to init ife->metalist earlier in tcf_ife_init()
> > to avoid the following crash :
>
> hello Eric, and thanks for the patch.
>
> If I well understand the problem, we have
>
> _tcf_ife_cleanup()
>
> that does dereference of NULL ife->metalist,
> because it has not yet initialized by tcf_ife_init(). This happened
> probably because the control action was not valid (hence the Fixes:tag):
> so, tcf_ife_init() jumped to the error path before doing INIT_LIST_HEAD().
>
> I applied your patch to my tree, and I see this:
>
> net/sched/act_ife.c: In function 'tcf_ife_init':
> net/sched/act_ife.c:533:3: warning: 'ife' may be used uninitialized in
> this function [-Wmaybe-uninitialized]
>    INIT_LIST_HEAD(&ife->metalist);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> And I think the warning is telling us a real problem, because
>
>         ife = to_ife(*a);
>

Oops right, thanks for catching this. I am sending a V2.

Powered by blists - more mailing lists