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] [day] [month] [year] [list]
Date:   Thu, 2 Feb 2023 11:48:04 +0000
From:   Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To:     Jakub Kicinski <kuba@...nel.org>, Vadim Fedorenko <vadfed@...a.com>
Cc:     Rahul Rameshbabu <rrameshbabu@...dia.com>,
        Tariq Toukan <ttoukan.linux@...il.com>,
        Gal Pressman <gal@...dia.com>,
        Saeed Mahameed <saeed@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net v4 2/2] mlx5: fix possible ptp queue fifo
 use-after-free

On 02/02/2023 03:08, Jakub Kicinski wrote:
> On Wed, 1 Feb 2023 04:26:05 -0800 Vadim Fedorenko wrote:
>> +	if (skb_cc > skb_id || PTP_WQE_CTR2IDX(ptpsq->skb_fifo_pc) < skb_id) {
> 
> FWIW I still can't understand why this is correct. If we lose ts for
> the last elem before wrap we'll see something like (assume wrap at 256
> for easier math):
> 
>    cc: 255  pc: 2    skb_id: 0   => cc > skb_id, OOO, drop
>    cc: 255  pc: 2    skb_id: 1   => cc > skb_id, OOO, drop
>    cc: 255  pc: 3 // produce
>    cc: 255  pc: 3    skb_id: 2   => cc > skb_id, OOO, drop
>    cc: 255  pc: 4 // produce
>    cc: 255  pc: 4    skb_id: 3   => cc > skb_id, OOO, drop
> 
> No?

Agreed. I'll change the check in the next version, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ