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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yt1Fbv9t/BBeYe1Z@t14s.localdomain>
Date:   Sun, 24 Jul 2022 10:13:18 -0300
From:   Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To:     Duoming Zhou <duoming@....edu.cn>
Cc:     linux-sctp@...r.kernel.org, vyasevich@...il.com,
        nhorman@...driver.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] sctp: fix sleep in atomic context bug in timer
 handlers

Hi,

On Sat, Jul 23, 2022 at 09:58:09AM +0800, Duoming Zhou wrote:
> There are sleep in atomic context bugs in timer handlers of sctp
> such as sctp_generate_t3_rtx_event(), sctp_generate_probe_event(),
> sctp_generate_t1_init_event(), sctp_generate_timeout_event(),
> sctp_generate_t3_rtx_event() and so on.
> 
> The root cause is sctp_sched_prio_init_sid() with GFP_KERNEL parameter
> that may sleep could be called by different timer handlers which is in
> interrupt context.
> 
> One of the call paths that could trigger bug is shown below:
> 
>       (interrupt context)
> sctp_generate_probe_event
>   sctp_do_sm
>     sctp_side_effects
>       sctp_cmd_interpreter
>         sctp_outq_teardown
>           sctp_outq_init

This sequence is odd but it is used when handling dup cookies. It
tears down whatever was in there and re-inits it. With that,

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>

>             sctp_sched_set_sched
>               n->init_sid(..,GFP_KERNEL)
>                 sctp_sched_prio_init_sid //may sleep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ