No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniil Tatianin 8f97eeb02a qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure
[ Upstream commit 13a7c8964afcd8ca43c0b6001ebb0127baa95362 ]

adapter->dcb would get silently freed inside qlcnic_dcb_enable() in
case qlcnic_dcb_attach() would return an error, which always happens
under OOM conditions. This would lead to use-after-free because both
of the existing callers invoke qlcnic_dcb_get_info() on the obtained
pointer, which is potentially freed at that point.

Propagate errors from qlcnic_dcb_enable(), and instead free the dcb
pointer at callsite using qlcnic_dcb_free(). This also removes the now
unused qlcnic_clear_dcb_ops() helper, which was a simple wrapper around
kfree() also causing memory leaks for partially initialized dcb.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: 3c44bba1d2 ("qlcnic: Disable DCB operations from SR-IOV VFs")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:41:57 +01:00
arch KVM: nVMX: Properly expose ENABLE_USR_WAIT_PAUSE control to L1 2023-01-18 11:41:54 +01:00
block
certs
crypto
Documentation
drivers qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure 2023-01-18 11:41:57 +01:00
fs nfsd: shut down the NFSv4 state objects before the filecache 2023-01-18 11:41:56 +01:00
include SUNRPC: ensure the matching upcall is in-flight upon downcall 2023-01-18 11:41:56 +01:00
init
ipc
kernel
lib mm/highmem: Lift memcpy_[to|from]_page to core 2023-01-18 11:41:55 +01:00
LICENSES
mm
net net: sched: fix memory leak in tcindex_set_parms 2023-01-18 11:41:57 +01:00
samples
scripts
security device_cgroup: Roll back to original exceptions after copy failure 2023-01-18 11:41:50 +01:00
sound
tools KVM: VMX: Fix the spelling of CPU_BASED_USE_TSC_OFFSETTING 2023-01-18 11:41:54 +01:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.