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 6155CC433EF for ; Fri, 4 Feb 2022 00:41:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D06B83A65; Fri, 4 Feb 2022 01:41:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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="PfOKwhu1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B451183A37; Fri, 4 Feb 2022 01:41:10 +0100 (CET) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 8FAC783A65 for ; Fri, 4 Feb 2022 01:41:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x829.google.com with SMTP id z1so4452442qto.3 for ; Thu, 03 Feb 2022 16:41:07 -0800 (PST) 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=Nn+Y1lljTg9JYt3FODh5Ka/gmlP5esAzB2CNGipOCiY=; b=PfOKwhu1LRoLjAT96aqs92MZch9QLbTPy0ZVNkQJohVnMj2ZMQuMWC1AiGbTXKRXkn YtX8atwq6zE8I2gDq00zICP4LWFapl+9UHoI+j0cBoWcctfbm97I5MIRxsbIC5oY7Kny Ae1oRhVaT+WhUVcUG6LQV81Dsl9EaTIjWPkRM= 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=Nn+Y1lljTg9JYt3FODh5Ka/gmlP5esAzB2CNGipOCiY=; b=IM5boe4LWEKrlM+IYmxc+20WoNlG5rKOsJYOOky+7e+Lw5utglhQYFkM0yRve5SlXB S5Ee05GWrNdgUJbXQirCzRwvUx2q1R2fGrgkOYG+m+SWhgdkKGgB/cXzxpzpdgJRjqlT AERgU3xPBK+gHiLodyj55KB6Cutp6ZOUvepJzCNraOrnyl/pqlstyZHhSvCKLhTM9e3e bX6Rtrh+Kr3mCD62xCpGYNcRQG99fvHmQ8yjWPk7FtnXgntIn/b0z3EhWPcDKr0QHeRn Vxb12S2QLDsRwITRSVIW4bvexsNRxgEOSk1eckASDsqQ5t9iZ2KmHG5b6teoRnnF/JD5 zB3A== X-Gm-Message-State: AOAM532TSYuwMrZLYvmXhzELMPsw0IXa7zx6EJqT3JQOYzR4hqIQIkK/ /c3CjagwX0lMlydLa127+LZV4A== X-Google-Smtp-Source: ABdhPJyWqLskES8HVMtoXHHMQ0ZDiDyeb/V518XMUosQfa144tWlQYM4of16bQUFoxGnOJPnZGscsw== X-Received: by 2002:ac8:7312:: with SMTP id x18mr505773qto.394.1643935266479; Thu, 03 Feb 2022 16:41:06 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id j11sm281861qtx.67.2022.02.03.16.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 16:41:05 -0800 (PST) Date: Thu, 3 Feb 2022 19:41:04 -0500 From: Tom Rini To: Vignesh Raghavendra Cc: Stefan Roese , Alexandru Gagniuc , u-boot@lists.denx.de Subject: Re: [PATCH] spl: ymodem: Fix buffer overflow during Image copy Message-ID: <20220204004104.GL7515@bill-the-cat> References: <20220131041919.1679901-1-vigneshr@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9KV7gQ2WEwhe+RIz" Content-Disposition: inline In-Reply-To: <20220131041919.1679901-1-vigneshr@ti.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 --9KV7gQ2WEwhe+RIz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 31, 2022 at 09:49:19AM +0530, Vignesh Raghavendra wrote: > ymodem_read_fit() driver will end copying up to BUF_SIZE boundary even > when requested size of copy operation is less than that. > For example, if offset =3D 0, size =3D 1440B, ymodem_read_fit() ends up > copying 2KB from offset =3D 0, to destination buffer addr >=20 > This causes data corruption when malloc'd buffer is passed during UART > boot since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer > for loading images") >=20 > With this, UART boot works again on K3 (AM654, J7, AM64) family of > devices. >=20 > Fixes: 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading im= ages") > Signed-off-by: Vignesh Raghavendra Applied to u-boot/master, thanks! --=20 Tom --9KV7gQ2WEwhe+RIz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmH8diAACgkQFHw5/5Y0 tyw/+Qv8Cq1MnHI/S6dJpCNv9vEtfuWNjs1QSNeH4OIrWZHmCKkNEjpkwIHm63bC 6iOUS1a1gtGWj0yBPBAPzLucZKTd9bB1HOnpLBQzuo7e9rVV4M5t5HJC7UQz+v/N 367k01kpjC7XLX2Ty9F7paRrkThN4M5BiTSkMPyPqogPAj1KRFPyZ/ZFH6XAEEcE J+fkoeJMdVZLcsqp3utwnDogvQFXHvhPXPguuii1EJGi6uOZmkq7ZdHUbVnaw272 HHToAjiaHPYZCqRg1HH+hQRCdte2bR662xPoVmMF3zxqQBqgNpR//OH28AIEEPeo MCUygc8HHpN/yxkp6dffD/FJFKjnkptUC+vZK66t1MZ67ZioFQ2+y+0l95+ZO4Xa +WAEGx5yju2y9sfJhImCOpV7v1qpvtp3UoznAuySD35pNTL9a0FgYIvLNijGP8es tEczOu/bMaRfXFQVL24BfnpyJD+KLEoqwA4AguJtaptl9n4vd30ZYQR47IYUo/dO yeIzADZU =EsEz -----END PGP SIGNATURE----- --9KV7gQ2WEwhe+RIz--