From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB198C61DA4 for ; Thu, 9 Feb 2023 14:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbjBIOEQ convert rfc822-to-8bit (ORCPT ); Thu, 9 Feb 2023 09:04:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbjBIOEP (ORCPT ); Thu, 9 Feb 2023 09:04:15 -0500 Received: from us-smtp-delivery-44.mimecast.com (unknown [207.211.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABC612D6F for ; Thu, 9 Feb 2023 06:04:14 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-173-9K7WMDo-NoGzWZCcbQKShg-1; Thu, 09 Feb 2023 09:03:57 -0500 X-MC-Unique: 9K7WMDo-NoGzWZCcbQKShg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E886D1C04B6B; Thu, 9 Feb 2023 14:03:56 +0000 (UTC) Received: from hog (unknown [10.39.192.162]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDDE9140EBF6; Thu, 9 Feb 2023 14:03:54 +0000 (UTC) Date: Thu, 9 Feb 2023 15:02:11 +0100 From: Sabrina Dubroca To: Herbert Xu Cc: Hyunwoo Kim , steffen.klassert@secunet.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, imv4bel@gmail.com, netdev@vger.kernel.org Subject: Re: [v2 PATCH] xfrm: Zero padding when dumping algos and encap Message-ID: References: <20230204175018.GA7246@ubuntu> <20230208085434.GA2933@ubuntu> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: queasysnail.net Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2023-02-09, 09:09:52 +0800, Herbert Xu wrote: > v2 fixes the mistaken type of XFRMA_ALG_COMP for x->encap. > > ---8<--- > When copying data to user-space we should ensure that only valid > data is copied over. Padding in structures may be filled with > random (possibly sensitve) data and should never be given directly > to user-space. > > This patch fixes the copying of xfrm algorithms and the encap > template in xfrm_user so that padding is zeroed. > > Reported-by: syzbot+fa5414772d5c445dac3c@syzkaller.appspotmail.com > Reported-by: Hyunwoo Kim > Signed-off-by: Herbert Xu Thanks Herbert. Reviewed-by: Sabrina Dubroca -- Sabrina