]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: Decrement TID on RX peer frag setup error handling
authorKarthikeyan Kathirvel <quic_kathirve@quicinc.com>
Mon, 26 May 2025 03:47:13 +0000 (09:17 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 23 Jun 2025 14:28:33 +0000 (07:28 -0700)
Currently, TID is not decremented before peer cleanup, during error
handling path of ath12k_dp_rx_peer_frag_setup(). This could lead to
out-of-bounds access in peer->rx_tid[].

Hence, add a decrement operation for TID, before peer cleanup to
ensures proper cleanup and prevents out-of-bounds access issues when
the RX peer frag setup fails.

Found during code review. Compile tested only.

Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250526034713.712592-1-quic_sarishar@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp.c

index 6317c6d4c043719a2cbcd34c3325b9ecf36b8499..c6b10acb643e1840e0f6da16d659b70e02c018e4 100644 (file)
@@ -84,6 +84,7 @@ int ath12k_dp_peer_setup(struct ath12k *ar, int vdev_id, const u8 *addr)
        ret = ath12k_dp_rx_peer_frag_setup(ar, addr, vdev_id);
        if (ret) {
                ath12k_warn(ab, "failed to setup rx defrag context\n");
+               tid--;
                goto peer_clean;
        }