Bug 281158

Summary: [PATCH] mfiutil: Handle potential ioctl(2) failures in mfi_flash.c
Product: Base System Reporter: WHR <msl0000023508>
Component: binAssignee: Xin LI <delphij>
Status: Closed FIXED    
Severity: Affects Only Me CC: delphij
Priority: ---    
Version: 15.0-CURRENT   
Hardware: Any   
OS: Any   
URL: https://sourceforge.net/p/mfiutil/code/ci/e956d4a6218e1e965d1cac2666dfda4215211a69/
Attachments:
Description Flags
proposed fix
none
proposed fix none

Description WHR 2024-08-31 10:35:49 UTC
Created attachment 253205 [details]
proposed fix

The return value of function 'mfi_dcmd_command' should always be checked for the potential ioctl(2) failure.
Comment 1 WHR 2024-08-31 11:25:32 UTC
Created attachment 253214 [details]
proposed fix
Comment 2 WHR 2024-09-03 05:26:56 UTC
Included in https://github.com/freebsd/freebsd-src/pull/1403/
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-03 05:48:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=bac98f86c98421f6153c749b6c77995ef778e2fb

commit bac98f86c98421f6153c749b6c77995ef778e2fb
Author:     WHR <whr@rivoreo.one>
AuthorDate: 2024-09-03 05:12:20 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2024-09-03 05:46:51 +0000

    mfiutil: Handle potential ioctl(2) failures in mfi_flash.c

    The return value of function 'mfi_dcmd_command' should always be checked for
    the potential ioctl(2) failure.

    PR:             281158
    MFC after:      1 week
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1403

 usr.sbin/mfiutil/mfi_flash.c | 39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-09-10 04:31:36 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=b10e93220e5221147483ef17f015863138e31583

commit b10e93220e5221147483ef17f015863138e31583
Author:     WHR <whr@rivoreo.one>
AuthorDate: 2024-09-03 05:12:20 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2024-09-10 04:30:51 +0000

    mfiutil: Handle potential ioctl(2) failures in mfi_flash.c

    The return value of function 'mfi_dcmd_command' should always be checked for
    the potential ioctl(2) failure.

    PR:             281158
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1403

    (cherry picked from commit bac98f86c98421f6153c749b6c77995ef778e2fb)

 usr.sbin/mfiutil/mfi_flash.c | 39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)