From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796017347; b=0+K534vSDTT9X/wagF8PPib+T+iMcyYnhMaD4iwEiBCxQWENpmQw5jKBisaHaGw1Z5us yEUt35k/a+COPmgVFROOZQ7wTm45UpeZ5LbmUF4o01DAx9iqYH4ePSdvTzgZj2a7U6GQ5 xnRN47MBUAErJbq4qB5lgnD363aWc932VHYvgxyt8kMMveugmf/GVkurADkrw/dmOymbg GqeLaRufetIkrQQYtFzRRMOFQufNoEa9PGhvyjogHu8jdLFY/y/WSp6Xpuw3MC1dX5Ezp J+5LVeBNrq5P2mnug7ml7kSGixBLxn7dTYf+3xRz3arCh36powOlLViD71OOawMmm2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796017347; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding: Content-Disposition; bh=tkxKA6dOvt1pPcrXysqUiEUhbAuKRRFHkvxFhILvGrM=; b=NAYXpBx8Jxw69h4kaIoFznCAuGRmkiBaJZhtXadAZ1lcdSltj6bJZb3YetwyQY0ZLyIY ZC+B5DbZNZqB1wdon7BvgNQhtJPj4Sj98XiQN04oBx0LmAwhjFilddiUsuEq+lIUF/r/w bB4uidBCvJ7KzDUu1mwx3ZANQP5c3afn9JpzbT9Xg6nTpLWFmKCoLioyMtgtSZVTp4nyE VsrPRmhv/CCbbDfQ4nPUcZPpRXFdeI6cDNDJmgKMy3rBtZpKzT44eBg5EoV4bzE+139tQ f8JIjKtXq1IY0wAVumqC8xo3Cy8hr3bMs2sKcCabaUdJhS4NnWzMp2WmcZJ/HVvZhFA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NhmPaKHT; arc=none smtp.remote-ip=74.125.82.169 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE6D1606A325 for ; Mon, 30 Nov 2026 05:42:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DE6D1606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NhmPaKHT Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-386c4d2e2ccso9019438eec.0 for ; Sun, 29 Nov 2026 21:42:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796017346; x=1796622146; darn=vger.kernel.org; h=content-disposition:content-transfer-encoding:content-type :mime-version:references:in-reply-to:subject:cc:to:from:message-id :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=tkxKA6dOvt1pPcrXysqUiEUhbAuKRRFHkvxFhILvGrM=; b=NhmPaKHTzhqplw+qhSwCIGSLIf4oYJ4neFD8+6xJXtc7/CcL48E6q8I142DGeC9R7O ep2u/MEV6Wpie6WObv9wz/e85IBbDLGYHW/AX0SWqAXPbxPaFBlQsoMl7ySPKptTA0PK 6RmtCnjerrb9tqtpkIG5yjCKnqsqiQnJq5uQQynk0oDhSRM9kdVsVvl9YhepWe0A4rv0 4z1KDZlMiUsYyj/sA5W32Bfi1YbaoDlg803ASJac0A87si2wHO9ssg01bgVf0HYFD+KC dQERAlmoP2IPEidOmJMqXVV7xZiZr/TlOBQbEOOknlCjVRZiGR+9h8SLU2d/SaQ6jwtk 1TvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796017346; x=1796622146; h=content-disposition:content-transfer-encoding:content-type :mime-version:references:in-reply-to:subject:cc:to:from:message-id :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=tkxKA6dOvt1pPcrXysqUiEUhbAuKRRFHkvxFhILvGrM=; b=egnIdcDUHc374nfWQr9+VD/1hA1ccsGTRZ39h8jNR/A1hEtZCsidv0ULsnYnOSmu0L LeBa7+cXd5DKVnGYiEdtcGt5x3jVSC9GElMEnf/vww2r6U44O1tcLcm0aMANwn/gh9IG 7igJqqOoSDL/vUfF0IaE3JbbCX6ZNeIS0ebaM+NTWT2m33DzSI/lIN8Qkw5/IO2K9+/B 791UI85RWi4vHcXJWUJYHQE51JC+k0PnHvlsQ3oD+0fln2gQ7iOvaeT+wbok5FhA86nK mR/H9Pw8AsGE5juekuH9kG/WFfZtwHhMLGXx+jAWXjSsQsfokCEf3mGgFt0J0DaEWqFg Puiw== X-Forwarded-Encrypted: i=1; AL+hErHIb1A4lAgeu361wHM8y5HcCyv7qgl1ll+y+0aysjBe/9lYNpNwT6E5+V98SapqvNMgp48g8vL7fB3D55Q=@vger.kernel.org X-Gm-Message-State: APuU4Z/lZi48RYsdTXvjZgZ/KfGuMsRhXDaGTvKm6gecgZ6M0yxVdtl2 CA4mG96EaILpePWVzG7eIEAhf9W7BrDH9WysVpk9PGlEf+bIXP1aZovA X-Gm-Gg: AZFdTZe6wBCByXHZt1LT1pJiQkgUD6BpVme73WlqNnmizpdgNaHs5SWgvwT4Vm46ipj 3uf3o870YBIXLICGDdO3Ct79kGnES8ukjcWTo0o+P6IF9arzKcY87G+5qSAEbBOUnc2yJO1ikwv JfFLuX3TBykFVZvqjyD7sASeEp/yYeo4o2M3uhn3ZXX/wt2sgc3KI4C6TgegzGd4AyC5XxTVW4A nj02+g1sCaeGHe/aMeEPyU0mUK3nml+r2YuV1Elqrmcs5oU0MF8dx1afJc0O52MaOeZTgUn8Moq 3VSi4XjMTULTZODjWatKbYTf+cKbDGqhdkYgDx5nOlbxTnJPBo0lxcEVQamOSQJfb2QkifOdDBh zTXWreJPFW5pHKhydLavEFU81h9c7lvWlTMKtrN5OeTo+mT/qFu+2+PqCitDDZyyVhIP3sI3VZh 2W28/PlJFQnNKO0VqtznkEBLCCRUCRWhb7B+NaXxRk6lk2o2kFM/elDmPLGhqcAq2TSiNgkC6Dq Qe6BwANO4Rx3UJoHooWHYAAhlJJb2QQ2yzcER50WWMpP7P79wa9hCGZJflZhTVPtDB9UUtIXqjq dPj79gmCYIVidzFBmFck3u5qxf2LawMSWGfixGVm4QPAtnOHkPERVvAVEpbpgUHrDKUkGwiuczd 8htzkVOGMGHLv+A== X-Received: by 2002:a05:693c:8209:b0:383:e7af:c28d with SMTP id 5a478bee46e88-3856f14d5b2mr31300867eec.9.1796017345877; Sun, 29 Nov 2026 21:42:25 -0800 (PST) Received: from localhost ([2a00:79e0:2ebe:8:ba7e:5b43:81b2:edf]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386aaae4960sm63425803eec.18.2026.11.29.21.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 21:42:25 -0800 (PST) Date: Sun, 29 Nov 2026 21:42:24 -0800 Message-ID: <0e7810d2990a7f37c931dc75ff0104ba@gmail.com> From: Dmitry Torokhov To: Lee Jones Cc: Vojtech Pavlik , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 01/10] Input: adi - prevent off-by-one write in adi_read_packet() In-Reply-To: <20261127201050.3532488-2-lee@kernel.org> References: <20261127201050.3532488-1-lee@kernel.org> <20261127201050.3532488-2-lee@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Lee, On Fri, Nov 27, 2026 at 08:09:55PM +0000, Lee Jones wrote: > Compare adi[i].ret against ADI_MAX_LENGTH - 1 so the pre-incremented > index always stays within bounds. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Closes: https://sashiko.dev/#/bug/linux-951334ec-a996-4dc4-a03b-d7e6f716e5de > Cc: stable@vger.kernel.org > Signed-off-by: Lee Jones I already had a larger adi rework queued locally (including this fix), and this patch also does more than strictly necessary by reformatting the unrelated "else" branch, so I am going to post my series instead and CC you on it. Also, there are barely any systems left with gameport adapters, so having a rogue device attached is not a practical concern and we do not need to mark this for stable. Thanks. -- Dmitry