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>] [day] [month] [year] [list]
Date:   Tue, 29 Dec 2020 10:20:58 -0800
From:   Xie He <xie.he.0141@...il.com>
To:     Hillf Danton <hdanton@...a.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Krzysztof Halasa <khc@...waw.pl>
Subject: Re: [PATCH net v2] net: hdlc_ppp: Fix issues when mod_timer is called
 while timer is running

On Tue, Dec 29, 2020 at 12:10 AM Hillf Danton <hdanton@...a.com> wrote:
>
> >The code path that calls add_timer is for sending keep-alive packets
> >when operating in the OPENED state. If we have just changed to the
> >OPENED state in ppp_cp_event, we should wait for the amount of time
> >set by the (2nd) mod_timer call in ppp_cp_event, before firing the
>
> What if your change also covers the first case of mod_timer() in
> ppp_cp_event()?

Yes, for the 1st mod_timer call in ppp_cp_event, the situation is the
same. If it is called, it means we are sending out a Configure Request
or Terminate Request. In this case, we should wait for the amount of
time set by this mod_timer call, before firing the timer. We shouldn't
fire the timer immediately because this is not the intention of this
mod_timer call.

> >timer. We shouldn't fire the timer immediately after we change to the
> >OPENED state. This is not the intention of the (2nd) mod_timer call in
> >ppp_cp_event. Therefore aborting ppp_timer is the correct solution.
> >
> Given an expiring timer, is it the right time to call ppp_tx_flush() in
> addition to add/mod_timer()?

Do you mean when we are aborting ppp_timer, whether we need to call
ppp_tx_flush in the aborted ppp_timer? I don't think so. Because when
ppp_rx (which directly or indirectly calls ppp_cp_event) releases the
lock, it will call ppp_tx_flush. So we don't need to call it again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ