[Bug 258420] stge: fix null pointer dereference

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 11 Sep 2021 07:20:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258420

            Bug ID: 258420
           Summary: stge: fix null pointer dereference
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: ztong0001@gmail.com

Created attachment 227824
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=227824&action=edit
patch

stge_attach() could fail at line 464, sc->sc_spec remains NULL when
calling stge_detach(), thus bus_release_resources() at line 704 will
trigger null pointer dereference. We need to check the nulliness before
calling bus_release_resources().

-- 
You are receiving this mail because:
You are the assignee for the bug.