Re: [PATCH] e1000: avoid null pointer dereference on invalid stat type

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

 



On Fri, Nov 09, 2018 at 02:17:06PM +0100, Loic wrote:
Hello,

Please picked up this patch for linux 4.4 and 4.9.
Compiled/tested without problem.

Thank.

[ Upstream commit 5983587c8c5ef00d6886477544ad67d495bc5479 ]

From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Date: Fri, 22 Sep 2017 18:13:48 +0100
Subject: [PATCH] e1000: avoid null pointer dereference on invalid stat type

Currently if the stat type is invalid then data[i] is being set
either by dereferencing a null pointer p, or it is reading from
an incorrect previous location if we had a valid stat type
previously.  Fix this by skipping over the read of p on an invalid
stat type.

Detected by CoverityScan, CID#113385 ("Explicit null dereferenced")

Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Reviewed-by: Alexander Duyck <alexander.h.duyck@xxxxxxxxx>
Tested-by: Aaron Brown <aaron.f.brown@xxxxxxxxx>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>

Queued for 4.9 and 4.4, thank you.

--
Thanks,
Sasha



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux