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:   Thu, 26 Jan 2023 08:33:51 +0200
From:   Tariq Toukan <ttoukan.linux@...il.com>
To:     Vadim Fedorenko <vfedorenko@...ek.ru>,
        Vadim Fedorenko <vadfed@...com>, Aya Levin <ayal@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Jakub Kicinski <kuba@...nel.org>, Gal Pressman <gal@...dia.com>
Cc:     Vadim Fedorenko <vadfed@...a.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net v3 1/2] mlx5: fix skb leak while fifo resync and push



On 26/01/2023 3:02, Vadim Fedorenko wrote:
> From: Vadim Fedorenko <vadfed@...a.com>
> 
> During ptp resync operation SKBs were poped from the fifo but were never
> freed neither by napi_consume nor by dev_kfree_skb_any. Add call to
> napi_consume_skb to properly free SKBs.
> 
> Another leak was happening because mlx5e_skb_fifo_has_room() had an error
> in the check. Comparing free running counters works well unless C promotes
> the types to something wider than the counter. In this case counters are
> u16 but the result of the substraction is promouted to int and it causes
> wrong result (negative value) of the check when producer have already
> overlapped but consumer haven't yet. Explicit cast to u16 fixes the issue.
> 
> Fixes: 58a518948f60 ("net/mlx5e: Add resiliency for PTP TX port timestamp")
> Reviewed-by: Gal Pressman <gal@...dia.com>
> Signed-off-by: Vadim Fedorenko <vadfed@...a.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c  | 6 ++++--
>   drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +-
>   2 files changed, 5 insertions(+), 3 deletions(-)
> 

Thanks for your patch.
Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ