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: <AM0PR04MB60046AE4671F4D2B293FAB38E7AC9@AM0PR04MB6004.eurprd04.prod.outlook.com>
Date:   Tue, 28 Feb 2023 06:53:40 +0000
From:   Gaurav Jain <gaurav.jain@....com>
To:     Jakub Kicinski <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "borisp@...dia.com" <borisp@...dia.com>,
        "john.fastabend@...il.com" <john.fastabend@...il.com>
Subject: RE: [EXT] [PATCH net] tls: rx: fix return value for async crypto

Tested-by: Gaurav Jain <gaurav.jain@....com>

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Monday, February 27, 2023 11:42 PM
> To: davem@...emloft.net
> Cc: netdev@...r.kernel.org; edumazet@...gle.com; pabeni@...hat.com;
> Gaurav Jain <gaurav.jain@....com>; Jakub Kicinski <kuba@...nel.org>;
> borisp@...dia.com; john.fastabend@...il.com
> Subject: [EXT] [PATCH net] tls: rx: fix return value for async crypto
> 
> Caution: EXT Email
> 
> Gaurav reports that TLS Rx is broken with async crypto accelerators. The commit
> under fixes missed updating the retval byte counting logic when updating how
> records are stored. Even tho both before and after the change 'decrypted' was
> updated inside the main loop, it was completely overwritten when processing
> the async completions. Now that the rx_list only holds non-zero-copy records
> we need to add, not overwrite.
> 
> Reported-and-bisected-by: Gaurav Jain <gaurav.jain@....com>
> Fixes: cbbdee9918a2 ("tls: rx: async: don't put async zc on the list")
> Link:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.k
> ernel.org%2Fshow_bug.cgi%3Fid%3D217064&data=05%7C01%7Cgaurav.jain%4
> 0nxp.com%7C77f145ef30784d369bca08db18ee26ab%7C686ea1d3bc2b4c6fa92
> cd99c5c301635%7C0%7C0%7C638131183344515410%7CUnknown%7CTWFpbG
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
> 0%3D%7C3000%7C%7C%7C&sdata=PQE9yFQ85lN8RvbgLwLIZmRbCzZOVcF8VB
> MEWTgi%2B4Q%3D&reserved=0
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: borisp@...dia.com
> CC: john.fastabend@...il.com
> ---
>  net/tls/tls_sw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index
> 782d3701b86f..021d760f9133 100644
> --- a/net/tls/tls_sw.c
> +++ b/net/tls/tls_sw.c
> @@ -2127,7 +2127,7 @@ int tls_sw_recvmsg(struct sock *sk,
>                 else
>                         err = process_rx_list(ctx, msg, &control, 0,
>                                               async_copy_bytes, is_peek);
> -               decrypted = max(err, 0);
> +               decrypted += max(err, 0);
>         }
> 
>         copied += decrypted;
> --
> 2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ