From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 7B8FB3858CDA for ; Wed, 16 Aug 2023 19:07:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B8FB3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-77a62a84855so251757939f.1 for ; Wed, 16 Aug 2023 12:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1692212842; x=1692817642; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uLwTteegxho2OZKUBwkKwNMj6HT6iMlBQqav5Jj5UCE=; b=j/Is8INndfjSOZZC2gmJ39RUEtL/UFEuTAEQxtaoum3W29CDQhzQaIAFWosE3YlF2q UZHdR/1Ke2+fzv7xnULH2pmUxBS9VSslOIaQyuNp8+FU6zvr0eqoNfyg3Y9UYKuMAjx1 xenaMYS7QFcAMSwtPwvR39m5Z7F1pAchxweG+5JhhSJ73LOe5jkpM87jRWlx3egCS+CD zZq/ON/e9P8OrHSFsTv9HADs+kmXNSxNYzweLSuayK4Qfa5sFOf5ZFo2fbr8f8jGpGjB ME2rny85VbLyZGlvl5Xr+Zx0W+t+5+irYSgs3dA4/WWM4JFJGOXPCybimj6aJW+UPeOM 2T+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692212842; x=1692817642; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uLwTteegxho2OZKUBwkKwNMj6HT6iMlBQqav5Jj5UCE=; b=MGi7F8bRQLNZ7Ep1cnkrBHjNQ3xrjnGM+jDYs6FnUiAzsPBB+Q4V17aVuKe4wBY46o V/lRAWZs+ky1hDFWuzQqODE8ReXjYVPaNlCWvxKuOGzg9c+DlpexN22WisqJHE9cSUUc kS3KHC9rjw7Po8kw+SdaWtHeEbguaojuETSu/ayTJog01131cQ/Lpn65f+1v6OoX/xuJ 2CKS4y0tdquszrJPZagyUMMSOcWYhaIydDUl5wU5omlEqC3WkgaErlYkjD1sTMm0yFec L31wUrprznXxGlX81GkOLjPVgKDxTYhVLJ/PjMIRIuZxtEzXADaFQPOMSMf6dk+YjaRW HUYQ== X-Gm-Message-State: AOJu0Yw6/xNtOKQGUWVfezJrgEuF5rWrq9DyhmunD/zIWm2BOc0YrVIk ffe5u0qGBYW21XBwXtaTQt0f4A== X-Google-Smtp-Source: AGHT+IG6GStHhQolSg2b6HYw8IjmlEG7EQ2CxdY2XdQSPhWVZMIIOIFwmuEJvlu+9auk9ICQUbeB+w== X-Received: by 2002:a6b:6819:0:b0:77e:3d2f:d1f4 with SMTP id d25-20020a6b6819000000b0077e3d2fd1f4mr3398161ioc.15.1692212842561; Wed, 16 Aug 2023 12:07:22 -0700 (PDT) Received: from murgatroyd (75-166-142-177.hlrn.qwest.net. [75.166.142.177]) by smtp.gmail.com with ESMTPSA id dj6-20020a0566384b8600b0041f552e4aa2sm4297038jab.135.2023.08.16.12.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 12:07:22 -0700 (PDT) From: Tom Tromey To: Keith Seitz Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Avoid buffer overflow in ada_decode References: <20230816173133.867606-1-tromey@adacore.com> <54cd2609-2526-5ff6-37cb-640ace0c128a@redhat.com> X-Attribution: Tom Date: Wed, 16 Aug 2023 13:07:21 -0600 In-Reply-To: <54cd2609-2526-5ff6-37cb-640ace0c128a@redhat.com> (Keith Seitz's message of "Wed, 16 Aug 2023 10:56:39 -0700") Message-ID: <87jztuyffa.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Keith" == Keith Seitz writes: Keith> On 8/16/23 10:31, Tom Tromey via Gdb-patches wrote: >> A bug report pointed out a buffer overflow in ada_decode, which Keith >> helpfully analyzed. ada_decode had a logic error when the input was >> all digits. While this isn't valid -- and would probably only appear >> in fuzzer tests -- it still should be handled properly. >> This patch adds a missing bounds check. Tested with the self-tests >> in >> an asan build. Keith> That's excellent. Thank you for the quick turnaround! Keith> Reviewed-by: Keith Seitz Thanks. I'm going to check this in. Tom