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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82714C433EF for ; Thu, 14 Oct 2021 17:47:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A8D8B61037 for ; Thu, 14 Oct 2021 17:46:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A8D8B61037 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 66E2F83674; Thu, 14 Oct 2021 19:46:56 +0200 (CEST) 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="Sln/3L7N"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 70FE383674; Thu, 14 Oct 2021 19:46:54 +0200 (CEST) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 1E2B98356E for ; Thu, 14 Oct 2021 19:46:51 +0200 (CEST) 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-qk1-x732.google.com with SMTP id z40so6196055qko.7 for ; Thu, 14 Oct 2021 10:46:51 -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=BJfnARojb3lCpB93TLE7hnqlwslS5xoOY5ZJDAPEn6Q=; b=Sln/3L7N7rlT9u+/Rxl6PfH0gunVKF9SjptbQYNumaMWh9W6MViEYulditXRo3egjD NHtHc+tF5mpXIkfkV2lH9IDnj/3UXFMv8W2NS5nNOMy3O293xc9Asw5AarSaMHipiYqn 4eg4fDz3N62TYVkCUjDIAXS8W5blMF6bsOIDU= 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=BJfnARojb3lCpB93TLE7hnqlwslS5xoOY5ZJDAPEn6Q=; b=8EjGxo89wnRzV7WDwr8nnlN6l3JlQDG7gXLkpnAGpTlYNmRGqV9S13zXkbT0aFqnbK ZlmtJ7SfwrCsfU22vXgG9iShxjmm797hL+zIRA63WcFDlIGRDztLuEX7gLeZ8Kkbbn97 Wd1aDpQ3TceCIULo/Y7u6EFwWz8TSL2dQDk2V49Xvgn5m7kNtS9QuClDLIJ9Uv3eblMZ VZKszXX4sMw7i0q5FEXMKDUsZgz1RFy2uALlN93JMQw+3lQ9NZHbIRN+KqnUXHsPNpfy hFTbMmk46ViolZ/DbJse7wrqwWtS0JmHydeG2u4JkdlcMWRBz95ff59hEo0/n+q8L/82 9bbQ== X-Gm-Message-State: AOAM531r+KPz6Dq2vqsiJmtJDkTiHIxtU7crmCUjUqncdBqr9pSAhx7j qFAhrwYUWKVoMVt770xksODx/Q== X-Google-Smtp-Source: ABdhPJyb+AEcDjxWBAjD93V5R/OeprrVk8u+lp4fHSs4dkVs3Z0ITiE/IscFwl95rw88lAWjhsUWJA== X-Received: by 2002:a37:f71a:: with SMTP id q26mr5891768qkj.3.1634233609844; Thu, 14 Oct 2021 10:46:49 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-0d65-5385-0e85-d408.res6.spectrum.com. [2603:6081:7b01:cbda:d65:5385:e85:d408]) by smtp.gmail.com with ESMTPSA id 17sm1862589qtw.24.2021.10.14.10.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 10:46:49 -0700 (PDT) Date: Thu, 14 Oct 2021 13:46:47 -0400 From: Tom Rini To: Jincheng Wang Cc: u-boot@lists.denx.de Subject: Re: Double free vulnerability in sqfs commands ("sqfsls" and "sqfsload") Message-ID: <20211014174647.GH7964@bill-the-cat> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="olyKWv9NGJAVztu2" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean --olyKWv9NGJAVztu2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 12, 2021 at 04:07:43PM +0800, Jincheng Wang wrote: > Hello U-Boot lists! > I had been doing a fuzz testing in U-Boot . > There is a double free bug in U-Boot, in /fs/squashfs/sqfs.c in the > function sqfs_tokenize( ). > On the line 307, tokens[i] is being freed and the ret is being set -ENOME= M, > it will go to the out: label and free tokens[i] again (just like > CVE-2020-8432, double free in do_rename_gpt_parts() ). > Here is a sample command cause to crash in sandbox environment: > host bind 0 test.sqsh > sqfsls host 0 1//3 Thanks! Can you please submit a fix for this as a patch, as well as updating the existing sqfs tests to have this as an example? --=20 Tom --olyKWv9NGJAVztu2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFobQQACgkQFHw5/5Y0 tyysGwwAgrxFBzj2AwyP7WXiHt387mI+fLJHiTV1uVsB7TjMQte9K1tKZ+WMcFv/ k7Diogk3nMf589ZvoSo95F8RcIXi0jmW+79p63XOKbDOhAgU0zKjTCaiZ6J/49i+ x3Upy2kyRAmtpfXcbNBZ+7/W9VIwsz9fVcBzCTieDUh5EapX2zkllVv4tKX2aPl8 ga/5Xn4o1pKfbIzM+dIyNhyq62FJIfadUrbOOZXZYfc6Oqe1bRJpp1z2fUuf/KRr AuhuJlGWIJ/b2gUBmkrOR3x1pdSWWk7ENehWviY+0x+tvjXbNNXOG5vBoxpswEF+ h3D94QzwDtFsRCHCPPtp3wL7YKehi2bMoGqIM0SzOzOy8oMPEo00AfurL8os4m6j v0+wXUsC+JLO4jtkw9O/nTGppK0M1HhrQjBE04TyvSbOacn9BoQKz5GcVQ5D/1BF dHdn1vQ5kxGsf7sNBq0dRUz7drOiRnc7I/tAP9JmHiI0XXvddX8/FgBFRrkMj02B FycplgfD =D6et -----END PGP SIGNATURE----- --olyKWv9NGJAVztu2--