FreeBSD Bugzilla – Attachment 256871 Details for
Bug 284073
bnxt: kernel panic on 14.2-RELEASE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to assert OOB write on-stack allocated variable
0001-bnxt_en-Add-asserting-for-OOB-write-to-on-stack-allo.patch (text/plain), 1.23 KB, created by
Zhenlei Huang
on 2025-01-21 10:40:55 UTC
(
hide
)
Description:
Patch to assert OOB write on-stack allocated variable
Filename:
MIME Type:
Creator:
Zhenlei Huang
Created:
2025-01-21 10:40:55 UTC
Size:
1.23 KB
patch
obsolete
>From 679d3c9ff054e4167f70ad3ad5e57d9539a0203a Mon Sep 17 00:00:00 2001 >From: Zhenlei Huang <zlei@FreeBSD.org> >Date: Tue, 21 Jan 2025 17:58:18 +0800 >Subject: [PATCH] bnxt_en: Add asserting for OOB write to on-stack allocated > variable app[128] > >--- > sys/dev/bnxt/bnxt_en/bnxt_dcb.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/sys/dev/bnxt/bnxt_en/bnxt_dcb.c b/sys/dev/bnxt/bnxt_en/bnxt_dcb.c >index e1e0581d3c24..6bcc259d35da 100644 >--- a/sys/dev/bnxt/bnxt_en/bnxt_dcb.c >+++ b/sys/dev/bnxt/bnxt_en/bnxt_dcb.c >@@ -351,6 +351,7 @@ bnxt_hwrm_get_dcbx_app(struct bnxt_softc *softc, struct bnxt_dcb_app *app, int * > > n = data->count; > for (i = 0; i < n; i++, fw_app++) { >+ MPASS(*num_inputs < 128); > app[*num_inputs].priority = fw_app->priority; > app[*num_inputs].protocol = htobe16(fw_app->protocol_id); > app[*num_inputs].selector = fw_app->protocol_selector; >@@ -504,6 +505,7 @@ bnxt_hwrm_queue_dscp2pri_qcfg(struct bnxt_softc *softc, struct bnxt_dcb_app *app > > entry_cnt = le16toh(resp->entry_cnt); > for (i = 0; i < entry_cnt; i++) { >+ MPASS(*num_inputs < 128); > app[*num_inputs].priority = dscp2pri[i].pri; > app[*num_inputs].protocol = dscp2pri[i].dscp; > app[*num_inputs].selector = BNXT_IEEE_8021QAZ_APP_SEL_DSCP; >-- >2.46.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 284073
:
256708
|
256835
|
256867
| 256871 |
256886