svn commit: r359237 - stable/11/sys/cam/nvme
David Bright
dab at FreeBSD.org
Mon Mar 23 12:39:19 UTC 2020
Author: dab
Date: Mon Mar 23 12:39:18 2020
New Revision: 359237
URL: https://svnweb.freebsd.org/changeset/base/359237
Log:
MFC r359129:
Fix parameter reversal potentially causing buffer overrun.
Two arguments were reversed in calls to cam_strvis() in
nvme_da.c. This was found by a Coverity scan of this code within Dell
(Isilon). These are also marked in the FreeBSD Coverity scan as CIDs
1400526 & 1400531.
Sponsored by: Dell EMC Isilon
Modified:
stable/11/sys/cam/nvme/nvme_da.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/cam/nvme/nvme_da.c
==============================================================================
--- stable/11/sys/cam/nvme/nvme_da.c Mon Mar 23 12:38:44 2020 (r359236)
+++ stable/11/sys/cam/nvme/nvme_da.c Mon Mar 23 12:39:18 2020 (r359237)
@@ -774,9 +774,9 @@ ndaregister(struct cam_periph *periph, void *arg)
* the serial or model number strings.
*/
nvme_strvis(disk->d_descr, cd->mn,
- sizeof(disk->d_descr), NVME_MODEL_NUMBER_LENGTH);
+ NVME_MODEL_NUMBER_LENGTH, sizeof(disk->d_descr));
nvme_strvis(disk->d_ident, cd->sn,
- sizeof(disk->d_ident), NVME_SERIAL_NUMBER_LENGTH);
+ NVME_SERIAL_NUMBER_LENGTH, sizeof(disk->d_ident));
disk->d_hba_vendor = cpi.hba_vendor;
disk->d_hba_device = cpi.hba_device;
disk->d_hba_subvendor = cpi.hba_subvendor;
More information about the svn-src-all
mailing list