James Smart
afff0d2321
scsi: lpfc: Add Buffer overflow check, when nvme_info larger than PAGE_SIZE
...
Kernel crashes during fill_read_buffer when nvme_info sysfs file read.
With multiple NVME targets, approx 40, nvme_info may grow larger than
PAGE_SIZE bytes. snprintf(buf + len, PAGE_SIZE - len, ...) logic is flawed
as PAGE_SIZE - len can be < 0 and is accepted by snprintf. This results in
buffer overflow, and is detected with check from dev_attr_show and
fill_read_buffer.
Change to use scnprintf to a tmp array, before calling strlcat to ensure no
buffer overflow over PAGE_SIZE bytes.
Message "6314" created as a new message indicating when there is more nvme
info, but is truncated to fit within PAGE_SIZE bytes.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2018-07-10 22:15:08 -04:00
..
2018-06-14 16:25:43 +09:00
2018-06-06 13:49:25 -07:00
2018-06-12 16:19:22 -07:00
2018-06-19 22:02:25 -04:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-13 07:24:18 -07:00
2018-06-04 10:58:12 -07:00
2018-06-15 07:24:58 +09:00
2018-05-30 15:45:01 +02:00
2018-06-12 18:28:00 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-06-15 18:10:01 -03:00
2018-06-12 16:19:22 -07:00
2018-06-06 18:39:49 -07:00
2018-06-13 07:24:18 -07:00
2018-06-07 10:23:33 -07:00
2018-06-12 16:19:22 -07:00
2018-06-08 17:21:52 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 08:51:42 +09:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-17 05:25:18 +09:00
2018-06-15 18:10:01 -03:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-11 12:09:19 -07:00
2018-06-12 16:19:22 -07:00
2018-06-14 16:21:46 +09:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-07-02 16:44:32 -04:00
2018-06-15 18:10:01 -03:00
2018-06-12 18:28:00 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-06-07 10:23:33 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-06-17 05:25:18 +09:00
2018-06-12 18:28:00 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-14 16:21:46 +09:00
2018-06-14 16:21:46 +09:00
2018-06-12 16:19:22 -07:00
2018-06-12 18:28:00 -07:00
2018-06-17 05:25:18 +09:00
2018-06-12 16:19:22 -07:00
2018-06-12 18:28:00 -07:00
2018-06-05 16:20:22 -07:00
2018-06-08 15:16:44 -07:00
2018-06-15 08:11:05 -06:00
2018-06-12 16:19:22 -07:00
2018-06-12 18:28:00 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-04 10:58:12 -07:00
2018-06-15 18:10:01 -03:00
2018-06-12 18:28:00 -07:00
2018-06-12 16:19:22 -07:00
2018-05-29 16:38:16 +01:00
2018-06-06 18:39:49 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-06-07 12:34:37 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-14 16:25:43 +09:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 07:55:25 +09:00
2018-06-12 18:28:00 -07:00
2018-06-04 12:35:03 -07:00
2018-06-11 07:20:17 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-07-10 22:15:08 -04:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-15 07:55:25 +09:00
2018-06-15 18:11:26 -03:00
2018-06-12 16:19:22 -07:00
2018-06-15 18:10:01 -03:00
2018-07-02 16:44:32 -04:00
2018-06-12 18:28:00 -07:00
2018-06-15 07:31:07 +09:00
2018-06-12 16:19:22 -07:00
2018-07-02 16:44:32 -04:00
2018-06-12 16:19:22 -07:00
2018-06-12 13:11:26 -07:00
2018-07-02 16:44:32 -04:00
2018-06-17 05:25:18 +09:00
2018-06-12 16:19:22 -07:00
2018-06-16 06:35:02 +09:00
2018-06-05 16:20:22 -07:00
2018-06-12 12:56:02 -07:00
2018-07-02 16:44:32 -04:00
2018-06-06 17:27:14 -07:00