Search Linux Wireless

Re: [PATCH] ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tuo Li <islituo@xxxxxxxxx> wrote:

> kzalloc() is used to allocate memory for cd->detectors, and if it fails,
> channel_detector_exit() behind the label fail will be called:
>   channel_detector_exit(dpd, cd);
> 
> In channel_detector_exit(), cd->detectors is dereferenced through:
>   struct pri_detector *de = cd->detectors[i];
> 
> To fix this possible null-pointer dereference, check cd->detectors before
> the for loop to dereference cd->detectors.
> 
> Reported-by: TOTE Robot <oslab@xxxxxxxxxxxxxxx>
> Signed-off-by: Tuo Li <islituo@xxxxxxxxx>
> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>

Patch applied to ath-next branch of ath.git, thanks.

4b6012a7830b ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210805153854.154066-1-islituo@xxxxxxxxx/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux