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 51FB4C433EF for ; Fri, 29 Apr 2022 18:04:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C11183F0B; Fri, 29 Apr 2022 20:03:55 +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="WoG3tv1l"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E144E83DEF; Fri, 29 Apr 2022 20:03:37 +0200 (CEST) Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (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 3EBC883EF5 for ; Fri, 29 Apr 2022 20:03:33 +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-qv1-xf30.google.com with SMTP id jt15so5860921qvb.13 for ; Fri, 29 Apr 2022 11:03:33 -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=QLXFIpZESHjL0TwAe61vHnqtjpfNtncAByPDJDQ7pU4=; b=WoG3tv1lvwozwndqvM2KY2vdaIZEKxPPC+a+JpfsV0fkiFisJawq6xAn/K1YaMbWhp J37y/MWCaNSV20aPO4f6HKYNO5uZQNqiHbMIgSg5tC7dmzlzimZxmNDZ5BHAeBbAYrxe 60gwC1Kf2u0igYWq7xwPBkSn5jgJM13dBODsg= 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=QLXFIpZESHjL0TwAe61vHnqtjpfNtncAByPDJDQ7pU4=; b=qTtb9fKwZpU2+RIrmsjJwXaDMJMLjHsgzqZZW5EQuXLO4kU9fVbl1W9ItcJnPLAzJg 1s5BfCLp3iSHTA72pdzOS1AaRfKIRB8sFPK7RHDgco0WSSLHYJDIc/HCh/Fvxm+syJQG SBLrhtgjnUV1hxJ4WFWYnPqOHc21Ip54uMqRhaKlc5SNexhX6lI13C9dw/KwtFq8G9z6 T7aNlwS+ufqiXphA0DBwroxchW5jtCOMG+JrTuo+qzaax1KLk2kccke/6NojRAq+fTqo h7kb2KdENtk4FHHjL++qUTggLP3nlcmQVb8jce1NpgaPQcfZBYmglXk054/DKjVDHauZ iUQA== X-Gm-Message-State: AOAM532lsGq2rT65yLqE1bNBQCBxb5ScIOAVyMxro4hcME6bf3oRadtb K1XfEtB6BRU1j3RsIseY/nzJOg== X-Google-Smtp-Source: ABdhPJyol7Zug6E1PazsKGJIj06SNxVRfuOTDrDgwA2154vwmf4Bhh3IWlkX61kImazQMN9uEO79qg== X-Received: by 2002:a05:6214:224f:b0:43f:d536:d014 with SMTP id c15-20020a056214224f00b0043fd536d014mr347130qvc.50.1651255411528; Fri, 29 Apr 2022 11:03:31 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-4500-a827-6dbc-a8e1-e6af.res6.spectrum.com. [2603:6081:7b01:4500:a827:6dbc:a8e1:e6af]) by smtp.gmail.com with ESMTPSA id f9-20020ac859c9000000b002f36fb88b3fsm2088611qtf.24.2022.04.29.11.03.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:03:30 -0700 (PDT) Date: Fri, 29 Apr 2022 14:03:29 -0400 From: Tom Rini To: Andrew Scull Cc: u-boot@lists.denx.de, sjg@chromium.org, seanga2@gmail.com, Marek Vasut Subject: Re: [PATCH 4/8] usb: sandbox: Check for string end in copy_to_unicode() Message-ID: <20220429180329.GZ1182808@bill-the-cat> References: <20220403103915.3338027-1-ascull@google.com> <20220403103915.3338027-5-ascull@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iDgFKLa5Kp4Ejml3" Content-Disposition: inline In-Reply-To: <20220403103915.3338027-5-ascull@google.com> 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 --iDgFKLa5Kp4Ejml3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 03, 2022 at 10:39:11AM +0000, Andrew Scull wrote: > When copying the string in copy_to_unicode(), check for the null > terminator in each position, not just at the start, to avoid reading > beyond the end of the string. >=20 > Signed-off-by: Andrew Scull > Cc: Simon Glass > Cc: Marek Vasut > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! --=20 Tom --iDgFKLa5Kp4Ejml3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJsKHAACgkQFHw5/5Y0 tyzvQwwAiJZWCeaUMwqjFU+E73gYc1c0z9qMm8QwMV0HndPvBESbrYHhni8j6lKB oDuhGmazHpWwFQ9QLPm5mdv/9PldTUb0+sHkKhsVC3FrbQtWZz1vI4l/1VGzVzgt Tj9KqMkYpYj5FYT08c4SQsUmi6eZcM+/b/pGmobMGyhNzGb+nAzpHb30efJHBHyT Z7sFNAKiwoetyi+TKhbpEDB0Gnv0gPS7q25ruf+ZI33pXCs+2YruyPIQOxeZMWYV stOtaXHp6Dnhmbf55i5GmlH05wVHG9gfrQp3JkqCQVZF4ydt5+PtgXMRtiT1Cn2x J4ccz7uqFF3IGocJBb4jdaHHRq/tAmvjWseNlw9ERD97mXd5zzraY5WHa0WicFRh c0aYhI62kniQgNUhoAcQVaxjVzf7ZEZ10ovF5NedRlmBuyskmwOqCKgaAHquIiqm OaFWuwDSKPQ2pvBWqtItXBhCewuxgic5FTAPoaDEzNFL3SAjZFkX72TcEQi8oXRo XkZqIuqI =8jD5 -----END PGP SIGNATURE----- --iDgFKLa5Kp4Ejml3--