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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8333C433EF for ; Mon, 6 Jun 2022 14:43:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3023783AC6; Mon, 6 Jun 2022 16:43:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="ZXf4Yigr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E31FB83C61; Mon, 6 Jun 2022 16:43:35 +0200 (CEST) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9AD70811A6 for ; Mon, 6 Jun 2022 16:43:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x833.google.com with SMTP id y15so10484364qtx.4 for ; Mon, 06 Jun 2022 07:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=djesh+VIQXyg3HvmshDETPwsPG7vwxRxikzVVYzxo8s=; b=ZXf4Yigr0W9Fwu5dR6lcYdtQOw/Q3FRmpdyx+K/OSoyIrie/1lFL8ZGeSqs+biQq9B InIfPO/rvUpNsKcKx9AZxSQ1T1ty6JbKiFnnDWUgntOIRcuipN3tFEoDSTJKBWudKbjq wL2xhNR9ckUZh7+IQlIF/KrWCC4pJ4HuA7gts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=djesh+VIQXyg3HvmshDETPwsPG7vwxRxikzVVYzxo8s=; b=E54WAXYogU9RiHpMHWtGU3XA80rZGp75p6pebN1C/R1GpWQ17xd2Mq7krEhcil7NLC 1RXPq2uiLuxJrxRzV8PC3BOL2Ry77uJ9y1ioB2Em8+6ipW7t8FSDz43kXPTKsQQ5w72s fyEdZJ2TC2bt1CY/33tUvtst+12t0RyP6ZfRFiXrAB/LwwYEc+aoZeFwkd2x7j57wuKB WkWJ/1imDc4e4AiOnndtgEeD72+FErE+Ncw2yMvv+9NVNCeajGP7U5iq0G7caLbRdDFF WhjuMB7hRicK5Ue4LSb6Z+5tVAoBGzKmL5KaZ1stc4qZKRxw8x40kiIprUuSAYZXe7iX jYsw== X-Gm-Message-State: AOAM53295PGCpsKSw0e12P3rIjnuuJbLhmCkUzeXkaC1KF/9GjhPwLoK d+mp9VcEWpmIJtlkxNZCtWiPtPOtPmKFww== X-Google-Smtp-Source: ABdhPJxbUPgiPnAf/+ULNQ6ru+bJLWJWg3bFfSxRA7e/cGzhsjmiPY9rP+tPp9q4Oa1Olx/lXTwAbg== X-Received: by 2002:a05:622a:1452:b0:304:eb24:3eae with SMTP id v18-20020a05622a145200b00304eb243eaemr5090887qtx.328.1654526611406; Mon, 06 Jun 2022 07:43:31 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id d4-20020a376804000000b006a6b84c6cbdsm3133882qkc.30.2022.06.06.07.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:43:30 -0700 (PDT) Date: Mon, 6 Jun 2022 10:43:28 -0400 From: Tom Rini To: gerbert Cc: u-boot@lists.denx.de Subject: Re: [PATCH 1/1] CVE-2022-30767: unbounded memcpy with a failed length check Message-ID: <20220606144328.GT1958597@bill-the-cat> References: <6d19481182a3816a5e6908f313a466a9@mu-ori.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="chReQkDOePndSGWY" Content-Disposition: inline In-Reply-To: <6d19481182a3816a5e6908f313a466a9@mu-ori.me> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --chReQkDOePndSGWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 02, 2022 at 09:18:42PM +0300, gerbert wrote: > This patch tries to fix a CVE-2019-14196 fix >=20 > In if-condition, where NFSV2_FLAG is checked, memcpy call is performed > to transfer a reply data of NFS_FHSIZE size. Since the data field in > struct rpc_t structure has the size of (1024 / 4) + 26 =3D 282, while > NFS_FHSIZE is only 32, it won't lead to out-of-bounds write (considering > the size of data array won't change in the future). >=20 > What concerns if-condition for NFSV3_FLAG, since filefh3_length is > signed integer, it may carry negative values which may lead to memcpy > failure, so in this case we need to introduce not only boundary check > (filefh3_length > NFS3_FHSIZE), which exists, but also make sure that > filefh3_length is not negative. >=20 > Signed-off-by: gerbert This has been addressed as: https://patchwork.ozlabs.org/project/uboot/patch/20220518163103.372-1-zi0Bl= ack@protonmail.com/ and more clearly: https://source.denx.de/u-boot/u-boot/-/commit/bdbf7a05e26f3c5fd437c99e2755f= fde186ddc80 recently, thanks. --=20 Tom --chReQkDOePndSGWY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmKeEo0ACgkQFHw5/5Y0 tyx1vQwAj3RGwRkUn1CJBeTDJFw8vYeLPlNT8H0AIBVKH6FZ830dGGGsVKa572u3 fBKbnj1h2uPAs/78D3XerWW3tFkWpuqerLLkA0eAayRX/fQEin0YhKVglv7NguOY wlykpQYm0i74cev2nrzEleeu9YKxUAc/EY03JFLrWR8zvXWjK1he/BycniY6NvrA 9IDOx5qz9G2Iyqz6EL2JzYfYedVfAESt1sysy//wXuG9re88KK4IwkDXyGstrA0G VKfMrhw3P10E+ugyJZ4LELduL/g/lI6qfXP1cz7puv/u3X8c7P+hPw97t1UQqVTV GgNtIC9/XWNJtePXCnY+IPQa0cAstXTpsB9NlA2lzt7hp6joq0fc5NxDpYeKoIhS yLy0huvMfhOhkbXnV0EKKMquapITg8mndESBcJFfi8pePlJlFLoytzGPVSEGpLUi mdP5VS8iqHzIFQ8wwWEDvTkcMPt6MSZBn/dHGsiUovN2s7BfImoIwkgP0iPUHs+U T/Yikq0X =5a1W -----END PGP SIGNATURE----- --chReQkDOePndSGWY--