]> git.baikalelectronics.ru Git - kernel.git/commit
ipmi: fix use after free in _ipmi_destroy_user()
authorDan Carpenter <error27@gmail.com>
Tue, 15 Nov 2022 13:17:43 +0000 (16:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:49 +0000 (11:41 +0100)
commit1c1654b5b96e911e6ebe56245c39a845f81c2df3
tree24eab3b771fbda88345cacb2c69ffdc4ef199247
parent2ef9688db9b4aa5bb09c118c7091beae123b6fb3
ipmi: fix use after free in _ipmi_destroy_user()

commit a92ce570c81dc0feaeb12a429b4bc65686d17967 upstream.

The intf_free() function frees the "intf" pointer so we cannot
dereference it again on the next line.

Fixes: 3ceed4928e75 ("ipmi: Don't allow device module unload when in use")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Message-Id: <Y3M8xa1drZv4CToE@kili>
Cc: <stable@vger.kernel.org> # 5.5+
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ipmi/ipmi_msghandler.c