diff options
author | asomers <asomers@FreeBSD.org> | 2017-03-01 00:17:04 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2017-03-01 00:17:04 +0000 |
commit | 5b451d1acc9997bda0f88138104f3ced8e35b923 (patch) | |
tree | 88ec33a36e7ed8afa593a32d2b6512d117324af2 | |
parent | 18b3d79440aeccc9a6a183d71f69a3972a9e0a83 (diff) | |
download | FreeBSD-src-5b451d1acc9997bda0f88138104f3ced8e35b923.zip FreeBSD-src-5b451d1acc9997bda0f88138104f3ced8e35b923.tar.gz |
MFC r312995:
Initialize a stack variable in mprsas_get_sas_address_for_sata_disk
Thought it's difficult to reproduce, I think this variable was responsible
for a use-after-free panic when a SATA disk timed out responding to a SATA
identify command during boot.
Submitted by: slm
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9364
-rw-r--r-- | sys/dev/mpr/mpr_sas_lsi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index aeb9864..2dd6e57 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -893,6 +893,7 @@ mprsas_get_sas_address_for_sata_disk(struct mpr_softc *sc, u8 sas_status; memset(&ata_identify, 0, sizeof(ata_identify)); + memset(&mpi_reply, 0, sizeof(mpi_reply)); try_count = 0; do { rc = mprsas_get_sata_identify(sc, handle, &mpi_reply, |