Summary: | [PATCH] mfiutil: Handle potential ioctl(2) failures in mfi_flash.c | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | WHR <msl0000023508> | ||||||
Component: | bin | Assignee: | 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: |
|
Created attachment 253214 [details]
proposed fix
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(-) 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(-) |
Created attachment 253205 [details] proposed fix The return value of function 'mfi_dcmd_command' should always be checked for the potential ioctl(2) failure.