From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1721C823DD for ; Wed, 25 Mar 2026 05:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774415100; cv=none; b=LKVHOlDKrj7ouPp//NVuO2XfcqzegcxyI29SXII+EwSVt0wHHdMJfZ7z3wxZ1RuYfAwsQv2hjM8RIYtv2Q3UByDMtD2ThWDsPl7ZEY8FLrJrhGigNsYqqfMV7wAHVpJoCWDSiN/gud+mKeqn12lJCFPafQPxysA/hitMxOHkyt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774415100; c=relaxed/simple; bh=OpF9ZBdtIPrXDfXB9uFjaKStx0G0034YX/GTUaSMuVk=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=ehHr8FdaZ+fykbWlabNCkyEtWavlOa21ksc30rLoy7YeoPKzIB5a5Y+WHR1Zd/92KEWRxdOFkk6+WxS9UNqDGsN2dei0ZeONfKLQSJFICQev/8OYWYZaywhncPy/DfGkhyDA26WPao+0IaiFHj1oB+JNTTexhxKc6oPQEVtfISY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=R8JroLzI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="R8JroLzI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AC50C4CEF7; Wed, 25 Mar 2026 05:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774415099; bh=OpF9ZBdtIPrXDfXB9uFjaKStx0G0034YX/GTUaSMuVk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=R8JroLzIs2k16s8RlDqnDw5SI60QF6pyJMaPsJeNQpf5b0ZPxZTKIz+Lbs7dekFwG oqiNyIb9VDLLrLaKCp3pr5MW5F3va4g1E3pAEjhmIqCriatb4yGEzKX+36vck8nOF9 FBI8O92rOBlvXDSuGAbCoLohEXSoJWSch9b7ux5Y= Date: Tue, 24 Mar 2026 22:04:58 -0700 From: Andrew Morton To: "Masami Hiramatsu (Google)" Cc: Petr Mladek , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , David Laight , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/2] lib/vsprintf: Fixes size check Message-Id: <20260324220458.3ca2bfeb393eedb5cc7ff52d@linux-foundation.org> In-Reply-To: <177440550682.147866.1854734911195480940.stgit@devnote2> References: <177440550682.147866.1854734911195480940.stgit@devnote2> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 25 Mar 2026 11:25:06 +0900 "Masami Hiramatsu (Google)" wrote: > Here is the 4th version of patches to fix vsnprintf(). > > - Fix to limit the size of width and precision. > - Warn if the return size is over INT_MAX. > > Previous version is here; > > https://lore.kernel.org/all/177410406326.38798.16853803119128725972.stgit@devnote2/ > > In this version, do clamp() the width and precision before checking it and > accept negative precision[1/3] and add Petr's Reviewed-by[2/2]. AI review has flagged a couple of possible issues: https://sashiko.dev/#/patchset/177440550682.147866.1854734911195480940.stgit@devnote2