From nobody Tue Dec 5 18:55:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sl8qT4JjLz53Kyr; Tue, 5 Dec 2023 18:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sl8qT3nGBz4DLw; Tue, 5 Dec 2023 18:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701802517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ei7fyV7ExhekVk9cDOTBrsCp87c2QwGBuOTzdBgwNP4=; b=CVLwTHfRTwZcgqCD9E62qC+W/VuBi7YjNnFv8zx21wSsNYEt0yKhDjPd8NR5ytjnV9cAjD I8O3Aa+NduwERhYSNpUe0RVCF6UOdOFfY/lGsHyT4bLGNMRTv3OxpgNSb/C/78c0a/YGQ6 klgImrOgao60e6MLdUiHSczHtjVZB1/CcNSZ/bGU2A1jzq4Yt1Amay8wOmw6QGa1loVT93 CX4nmjkqpmbm0CuWt5tZehDAJTcaEAKMIRg/O//vVi2naYzESYYRO8sXnQK47QBV55X+Hy VwDOV2MFZDv71n0jSbmaKpKuhqyTTLh1YCKIMGPCjGq3jDZkwckKSVU8KmZhaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701802517; a=rsa-sha256; cv=none; b=KD/9+MjfdIsqvML3WtdPe4i5r+ZsV3FELhCGww46+b7e+ZsQvN5N92n/IXhRrQagpNOqxS hwbKO5VQCBSJnbOUCMIMq4mdCmaLBd13QoFbIJzhb4WSZ3dgLfY6qnsO23nBxiDBILgNNY KmlJB2w4N1APJT4LEobHCgHVqfQRPE876OZi994O/5+7BLhAEjZ8WWCAXf6C9smI4I6VQn JuGXN8Z0b1e9EQlIZhJ8hQyqlvhjZ8w1oFJ1L0kGcFqG25Yq8Pdi+CJpHyIkxyWvArifJH LK1TeTWP+XBfQw56CNGXQ4dOwmkClEHkwa1GUZMrADUcRriqwSqqs49qcg8ZMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701802517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ei7fyV7ExhekVk9cDOTBrsCp87c2QwGBuOTzdBgwNP4=; b=xMjK7HQE7YP1BhOhZlwQAgW3KzZiorpo0avh6xKMwJ0jJ3iYkijga9StQFuKNJSwURnmsR YTRXYTompJXI/GwGZOPyKYRK+rLI+RqVW4Ped9jATxoAYCzzhAgMCHnv904uldnwUhi/x/ XBBA+IsQJ3MRg3lXCem2arAu30c4FjK+l745tnLq5iwv8m+nct+xXYHC+GfUHdCUaqI96N kIvpzxnqqmGpOg0ThIxx5ZXR7oZpBN2buUV3znif0SU+HgzROPrjlXysU4n5VfVPECozBl lJG+14WTWCCgmvaYtH1j5eVMg9UTAfsETl8eFKmY7VA1+BsvZMCt4FbnERTObA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sl8qT2lbBz6cp; Tue, 5 Dec 2023 18:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B5ItHjS060091; Tue, 5 Dec 2023 18:55:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B5ItHrs060088; Tue, 5 Dec 2023 18:55:17 GMT (envelope-from git) Date: Tue, 5 Dec 2023 18:55:17 GMT Message-Id: <202312051855.3B5ItHrs060088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4c3aa00c0a00 - main - bhnd: Correct the softc size in the siba_bhndb_driver definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c3aa00c0a0093c78f42d138bb9eef9b1a7cbb39 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4c3aa00c0a0093c78f42d138bb9eef9b1a7cbb39 commit 4c3aa00c0a0093c78f42d138bb9eef9b1a7cbb39 Author: Mark Johnston AuthorDate: 2023-12-05 18:47:03 +0000 Commit: Mark Johnston CommitDate: 2023-12-05 18:47:03 +0000 bhnd: Correct the softc size in the siba_bhndb_driver definition struct siba_bhndb_softc embeds struct siba_softc and adds an extra field, "quirks". In practice, this bug was harmless since "quirks" is unconditionally initialized during driver attach and would have lived in the redzone of the softc allocation, but KASAN catches the out-of-bounds access. PR: 275515 Reported by: Frank Hilgendorf MFC after: 1 week --- sys/dev/bhnd/siba/siba_bhndb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bhnd/siba/siba_bhndb.c b/sys/dev/bhnd/siba/siba_bhndb.c index 5def2aad847a..57589537a921 100644 --- a/sys/dev/bhnd/siba/siba_bhndb.c +++ b/sys/dev/bhnd/siba/siba_bhndb.c @@ -285,7 +285,7 @@ static device_method_t siba_bhndb_methods[] = { }; DEFINE_CLASS_2(bhnd, siba_bhndb_driver, siba_bhndb_methods, - sizeof(struct siba_softc), bhnd_bhndb_driver, siba_driver); + sizeof(struct siba_bhndb_softc), bhnd_bhndb_driver, siba_driver); DRIVER_MODULE(siba_bhndb, bhndb, siba_bhndb_driver, NULL, NULL);