FreeBSD Bugzilla – Attachment 225301 Details for
Bug 255865
[PATCH] dev/ocs_fc: Fix uaf & double free bugs in ocs_hw_async_call
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
return OCS_HW_RTN_ERROR during failure.
PR-255865-uaf-fix.txt (text/plain), 979 bytes, created by
Ram Kishore Vegesna
on 2021-05-27 06:08:07 UTC
(
hide
)
Description:
return OCS_HW_RTN_ERROR during failure.
Filename:
MIME Type:
Creator:
Ram Kishore Vegesna
Created:
2021-05-27 06:08:07 UTC
Size:
979 bytes
patch
obsolete
>diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c >index d28d5e4a08b7..aa7d5857d9d9 100644 >--- a/sys/dev/ocs_fc/ocs_hw.c >+++ b/sys/dev/ocs_fc/ocs_hw.c >@@ -11778,7 +11778,6 @@ ocs_hw_async_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) > int32_t > ocs_hw_async_call(ocs_hw_t *hw, ocs_hw_async_cb_t callback, void *arg) > { >- int32_t rc = 0; > ocs_hw_async_call_ctx_t *ctx; > > /* >@@ -11798,15 +11797,15 @@ ocs_hw_async_call(ocs_hw_t *hw, ocs_hw_async_cb_t callback, void *arg) > if (sli_cmd_common_nop(&hw->sli, ctx->cmd, sizeof(ctx->cmd), 0) == 0) { > ocs_log_err(hw->os, "COMMON_NOP format failure\n"); > ocs_free(hw->os, ctx, sizeof(*ctx)); >- rc = -1; >+ return OCS_HW_RTN_ERROR; > } > > if (ocs_hw_command(hw, ctx->cmd, OCS_CMD_NOWAIT, ocs_hw_async_cb, ctx)) { > ocs_log_err(hw->os, "COMMON_NOP command failure\n"); > ocs_free(hw->os, ctx, sizeof(*ctx)); >- rc = -1; >+ return OCS_HW_RTN_ERROR; > } >- return rc; >+ return OCS_HW_RTN_SUCCESS; > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 255865
:
224929
| 225301