HomeFreeBSD

ocs_fc: Fix use after free bug in ocs_hw_async_call()

Description

ocs_fc: Fix use after free bug in ocs_hw_async_call()

Freed ctx is used in the later callee ocs_hw_command(),
which is a use after free bug.

Return error if sli_cmd_common_nop() failed.

PR: 255865
Reported by: lylgood@foxmail.com
Approved by:: markj

(cherry picked from commit 7377d3831bc8abec2d6e5fee359d7383d4551feb)

Details

Provenance
Ram Kishore Vegesna <ram@FreeBSD.org>Authored on May 28 2021, 5:51 AM
Parents
rG241d13765504: ocs_fc: Fix a use after free in ocs_sport_free
Branches
Unknown
Tags
Unknown

Event Timeline

Ram Kishore Vegesna <ram@FreeBSD.org> committed rGfa3e66e9f7cd: ocs_fc: Fix use after free bug in ocs_hw_async_call() (authored by Ram Kishore Vegesna <ram@FreeBSD.org>).Dec 17 2021, 9:45 AM