Gleb Chesnokov be9d368361 scst_targ: Fix shift out of bounds
This patch should fix the following UBSAN warning:

UBSAN: shift-out-of-bounds in scst/src/scst_targ.c:3912:6
shift exponent -1 is negative

Call Trace:
 <TASK>
 show_stack+0x52/0x5c
 dump_stack_lvl+0x4a/0x63
 dump_stack+0x10/0x16
 ubsan_epilogue+0x9/0x36
 __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef
 scst_process_active_cmd.cold+0xf/0x2d [scst]
 scst_process_redirect_cmd+0xd4/0x2e0 [scst]
 scst_tgt_cmd_done+0x48/0x70 [scst]
 scst_local_targ_xmit_response+0x64/0x220 [scst_local]
 scst_process_active_cmd+0x891/0x2140 [scst]
 scst_process_redirect_cmd+0xd4/0x2e0 [scst]
 scst_cmd_done_local+0x80/0x110 [scst]
 dev_user_process_reply+0x597/0x1160 [scst_user]
 dev_user_ioctl+0x145/0xb23 [scst_user]
 __x64_sys_ioctl+0x95/0xd0
 do_syscall_64+0x5c/0xc0
 entry_SYSCALL_64_after_hwframe+0x62/0xcc

Reported-by: Rob Turk <robtu@rtist.nl>
2023-12-28 11:58:22 +03:00
2023-04-28 15:22:58 +03:00
2022-12-28 17:08:44 +03:00
2023-04-28 15:22:58 +03:00
2023-12-28 11:58:22 +03:00
2021-03-15 04:06:56 +00:00

SCST

Coverity Downloads

Overview

This is the source code repository of the SCST project. SCST is a collection of Linux kernel drivers that implement SCSI target functionality. The SCST project includes:

  1. The SCST core in the scst/ subdirectory.
  2. A tool for loading, saving and modifying the SCST configuration in directory scstadmin/.
  3. Several SCSI target drivers in the directories iscsi-scst/, qla2x00t/, srpt/, scst_local/ and fcst/.
  4. User space programs in the usr/ subdirectory, e.g. fileio_tgt.
  5. Various documentation in the doc/ subdirectory.

Instructions for building and installing SCST are available in the INSTALL.md file.

QLogic target driver

Two QLogic target drivers are included in the SCST project.

The default driver is located in qla2x00t-32gbit directory and it supports up to 32 Gb/s FC. It is the newer one.

May anyone wish to switch back to the older driver that only supported up to 16 Gb/s adapters, it is located in qla2x00t directory. To make use of the older driver build scst with environment variable QLA_32GBIT=no set.

Vladislav Bolkhovitin vst@vlnb.net, http://scst.sourceforge.net

Sourceforge achievements

Description
No description provided
Readme 33 MiB
Languages
C 90.1%
Perl 4.2%
Shell 1.8%
HTML 1.7%
Makefile 1.2%
Other 0.9%