Bug 2040303 - The sgpio tool is not adapted to the scenario where the SCSI host id is greater than 10
Summary: The sgpio tool is not adapted to the scenario where the SCSI host id is great...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sgpio
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-13 12:20 UTC by Chancel
Modified: 2023-07-13 07:31 UTC (History)
0 users

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-13 07:31:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-107820 0 None None None 2022-01-13 12:23:15 UTC

Description Chancel 2022-01-13 12:20:16 UTC
Description of problem:
The sgpio tool is not adapted to the scenario where the SCSI host id is greater than 10.

Version-Release number of selected component (if applicable):
sgpio-1.2.0.10-21.el8.x86_64.rpm


How reproducible:must be present


Steps to Reproduce:
1.Insert enough hard drives without using a raid card;
2.Install OS using PCH mode;
3.yum install sgpio lsscsi;
4.Run lsscsi to check which hard disk has a host id greater than 10.Such as sdg.
5.Run "sgpio -d sdg -s locate".

Actual results:
It will output "buffer overflow" on the terminal.

Expected results:
Command executed successfully.

Additional info:
After analysis, this is a bug of the sgpio tool.The problem is that in the led_set(int port_num) function in the sgpio.c file.

The specific error at:
if(sprintf(disks[index].name,"Port %d", port_num) < 0){
    printf("Error: Unable to write port number to buffor!\n");
    return -1;
}

The size of disks[index].name is 7, once the host id is greater than 10, an error will be reported.

I hope this problem will be fix in the new version, thanks.

Comment 2 RHEL Program Management 2023-07-13 07:31:54 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.