git: d264ddb9c7f8 - stable/14 - bhnd: Correct the softc size in the siba_bhndb_driver definition

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 12 Dec 2023 00:30:13 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=d264ddb9c7f8739be22170ec660110a0f4c2ec8f

commit d264ddb9c7f8739be22170ec660110a0f4c2ec8f
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-05 18:47:03 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-12 00:30:05 +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 <frank.hilgendorf@posteo.de>
    MFC after:      1 week
    
    (cherry picked from commit 4c3aa00c0a0093c78f42d138bb9eef9b1a7cbb39)
---
 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 b806f9535e73..59243be18938 100644
--- a/sys/dev/bhnd/siba/siba_bhndb.c
+++ b/sys/dev/bhnd/siba/siba_bhndb.c
@@ -286,7 +286,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);