ath11k: fix invalid memory access
PATCH 1/1 ath11k: fix invalid memory access
dp_reo_cache_flush_elem element get dynamically allocated with invalid size which leads to the access of unallocated memory region or memory corruption. Fix this bug by allocate with dp_reo_cache_flush_elem structure size.
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +1 -1
@@ -568,7 +568,7 @@ static void ath11k_dp_rx_tid_del_func(struct ath11k_dp *dp, void *ctx,return ; } - elem =kzalloc (sizeof (elem),GFP_ATOMIC ); + elem =kzalloc (sizeof (*elem),GFP_ATOMIC );if (!elem) {ath11k_warn (ab,"failed to allocate memory for cache flush element\n" ); goto free_desc;
Signature · 7 lines
1.9.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 6 lines · Karthikeyan Periyasamy
dp_reo_cache_flush_elemelement get dynamically allocated with invalid size which leads to the access of unallocated memory region or memory corruption. Fix this bug by allocate withdp_reo_cache_flush_elemstructure size.Signed-off-by Karthikeyan Periyasamy <[email protected]>Signed-off-by Kalle Valo <[email protected]>
11 patches applied to ath11k-bringup branch of ath.git, thanks.
f1df70c948f4 ath11k: fix invalid memory access3213345e51fc ath11k: Remove unnecessary whitespaces 9d18a5b1d777 ath11k: Avoid blank lines related warning e3b79f9ec2a4 ath11k: Avoid space related warning dcc1fd37c6dd ath11k: Fix Alignment should match open parenthesis warning d2b20789808d ath11k: Fix misspelled warningse4e738f422d4 ath11k: fix unnecessary brace warnings 61bfed886e93 ath11k: fix Block comments warnings 1e9c09edaba3 ath11k: fix SPDX comment style warnings 6a82b2e7f17e ath11k: fix return statements on void function warnings ff1effad0d9b ath11k: fix string split across warnings
Signature · 9 lines
https://patchwork.kernel.org/patch/11007773/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 11 lines · Kalle Valo
Quoted 6 lines · Karthikeyan Periyasamy
dp_reo_cache_flush_elemelement get dynamically allocated with invalid size which leads to the access of unallocated memory region or memory corruption. Fix this bug by allocate withdp_reo_cache_flush_elemstructure size.Signed-off-by Karthikeyan Periyasamy <[email protected]>Signed-off-by Kalle Valo <[email protected]>11 patches applied to ath11k-bringup branch of ath.git, thanks.
Quoted 11 lines
f1df70c948f4ath11k: fix invalid memory access3213345e51fcath11k: Remove unnecessary whitespaces9d18a5b1d777ath11k: Avoid blank lines related warninge3b79f9ec2a4ath11k: Avoid space related warningdcc1fd37c6ddath11k: Fix Alignment should match open parenthesis warningd2b20789808dath11k: Fix misspelled warningse4e738f422d4ath11k: fix unnecessary brace warnings61bfed886e93ath11k: fix Block comments warnings1e9c09edaba3ath11k: fix SPDX comment style warnings6a82b2e7f17eath11k: fix return statements on void function warningsff1effad0d9bath11k: fix string split across warnings
BTW, you could have put all these checkpatch cleanup patches into one patchset (ie. one patcheset with 11 patches). Easier to manage them that way. If the patches are somehow related it's usually a good idea to combine them to the same patchset.
Signature · 6 lines
Kalle Valo _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k