Bug 281158 - [PATCH] mfiutil: Handle potential ioctl(2) failures in mfi_flash.c
Summary: [PATCH] mfiutil: Handle potential ioctl(2) failures in mfi_flash.c
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Xin LI
URL: https://sourceforge.net/p/mfiutil/cod...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-31 10:35 UTC by WHR
Modified: 2024-09-10 04:31 UTC (History)
1 user (show)

See Also:


Attachments
proposed fix (2.31 KB, patch)
2024-08-31 10:35 UTC, WHR
no flags Details | Diff
proposed fix (2.31 KB, patch)
2024-08-31 11:25 UTC, WHR
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(-)