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]
Date:   Wed, 1 Feb 2023 19:08:01 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Vadim Fedorenko <vadfed@...a.com>
Cc:     Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
        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 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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ