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: <3c987d40-6e47-3d7c-c6b9-b46ee5afcd57@cumulusnetworks.com>
Date:   Fri, 19 May 2017 18:05:57 +0300
From:   Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:     ivan.vecera@...a.cz
Cc:     Xin Long <lucien.xin@...il.com>,
        network dev <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] bridge: start hello_timer when enabling KERNEL_STP in
 br_stp_start

On 5/19/17 6:03 PM, Ivan Vecera wrote:
> 2017-05-19 16:57 GMT+02:00 Nikolay Aleksandrov <nikolay@...ulusnetworks.com>:
>> On 5/19/17 5:51 PM, Ivan Vecera wrote:
>>>
>>> 2017-05-19 16:45 GMT+02:00 Nikolay Aleksandrov
>>> <nikolay@...ulusnetworks.com>:
>>>>
>>>> On 5/19/17 5:20 PM, Xin Long wrote:
>>>>>
>>>>>
>>>>> Since commit 76b91c32dd86 ("bridge: stp: when using userspace stp stop
>>>>> kernel hello and hold timers"), bridge would not start hello_timer if
>>>>> stp_enabled is not KERNEL_STP when br_dev_open.
>>>>>
>>>>> The problem is even if users set stp_enabled with KERNEL_STP later,
>>>>> the timer will still not be started. It causes that KERNEL_STP can
>>>>> not really work. Users have to re-ifup the bridge to avoid this.
>>>>>
>>>>> This patch is to fix it by starting br->hello_timer when enabling
>>>>> KERNEL_STP in br_stp_start.
>>>>>
>>>>> As an improvement, it's also to start hello_timer again only when
>>>>> br->stp_enabled is KERNEL_STP in br_hello_timer_expired, there is
>>>>> no reason to start the timer again when it's NO_STP.
>>>>>
>>>>> Fixes: 76b91c32dd86 ("bridge: stp: when using userspace stp stop kernel
>>>>> hello and hold timers")
>>>>> Reported-by: Haidong Li <haili@...hat.com>
>>>>> Signed-off-by: Xin Long <lucien.xin@...il.com>
>>>>> ---
>>>>>     net/bridge/br_stp_if.c    | 1 +
>>>>>     net/bridge/br_stp_timer.c | 2 +-
>>>>>     2 files changed, 2 insertions(+), 1 deletion(-)
>>>>>
>>>>
>>>> This doesn't make much sense to me, how do you change from USER_STP to
>>>> KERNEL_STP without first going through NO_STP ?
>>>>
>>>> If you go through NO_STP then all will be fine because br_stp_stop will
>>>> restart
>>>> the timers if the previous val was USER_STP.
>>>>
>>> The problem occurs when KERNEL_STP is enabled if the bridge itself is
>>> already
>>> up. Then the hello_timer is not started. If the hello and hold timers
>>> should run only
>>> when KERNEL_STP is used then there are another problematic places
>>> (will send follow-up).
>>>
>>> Ivan
>>>
>>
>> Oh, the problem seems to be rather going from NO_STP -> KERNEL_STP only
>> then, because you cannot do direct USER_STP -> KERNEL_STP.
>>
> No only NO_STP->KERNEL_STP but KERNEL_STP->NO_STP as well as USER_STP->NO_STP:
> 
> 1) NO_STP->KERNEL_STP issue
> hello_timer should be started in br_stp_start() - this patch
> 

Right, I was talking only about this patch. By the way what about
the port hold_timers ? This patch only starts the hello_timer.

> 2) KERNEL_STP->NO_STP issue
> hello timer and hold timers should be stopped (deleted) in br_stp_stop()
> 
> 3) USER_STP->NO_STP issue
> hello timer and hold timers should NOT be started in br_stp_stop()
> 

Yep, ack.

> Ivan
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ