4195c7de24
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are
fixed-length strings. AFAICT the only place they're read is in
sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.
However, the kernel doesn't null-terminate them. A bunch of copy-pasted code
uses strncpy to write them, and doesn't guarantee null-termination. For at
least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually
overflows. You can see the result by doing "camcontrol negotiate da0 -v".
This change null-terminates those fields everywhere they're set in the
kernel. It also shortens a few strings to ensure they'll fit within the
16-character field.
PR: 215474
Reported by: Coverity
CID: 1009997 1010000
|
||
---|---|---|
.. | ||
scil | ||
environment.h | ||
isci_controller.c | ||
isci_domain.c | ||
isci_interrupt.c | ||
isci_io_request.c | ||
isci_logger.c | ||
isci_oem_parameters.c | ||
isci_remote_device.c | ||
isci_sysctl.c | ||
isci_task_request.c | ||
isci_timer.c | ||
isci.c | ||
isci.h | ||
README | ||
sci_environment.h | ||
types.h |
FreeBSD Driver for Intel(R) C600 SAS Controller =============================================== This driver has been developed for use with FreeBSD, version 9.0 and later. This driver uses an OS-agnostic abstraction layer library named SCIL that is published by Intel specifically for the C600 SAS controller. The SAS controller has no firmware, so the driver is extensive and using SCIL minimizes the development and maintenance cost of the driver. The FreeBSD implementation files are in the isci directory, and SCIL files are in the isci/scil subdirectory. As Intel publishes new versions of SCIL (to add features or fix bugs), the isci/scil subdirectory will be updated appropriately.