Skip to content

Commit 1a4e59f

Browse files
D-Trivenikrish2718
authored andcommitted
fw_if: system: Fix Bus Fault during raw TX
Add proper NULL checks and peer_id validation to prevent invalid memory access under continuous TX. Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
1 parent d0efc91 commit 1a4e59f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • fw_if/umac_if/src/system

fw_if/umac_if/src/system/tx.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,17 @@ static enum nrf_wifi_status update_pend_q_bmp(struct nrf_wifi_fmac_dev_ctx *fmac
272272
unsigned char *bmp = NULL;
273273
struct nrf_wifi_sys_fmac_dev_ctx *sys_dev_ctx = NULL;
274274

275+
if (!fmac_dev_ctx) {
276+
goto out;
277+
}
278+
279+
if (peer_id < 0) {
280+
goto out;
281+
}
282+
275283
sys_dev_ctx = wifi_dev_priv(fmac_dev_ctx);
276284

277-
if (!fmac_dev_ctx) {
285+
if (!sys_dev_ctx) {
278286
goto out;
279287
}
280288

0 commit comments

Comments
 (0)