No description
Find a file
王贇 a98d38fca3 net: fix NULL pointer reference in cipso_v4_doi_free
[ Upstream commit 733c99ee8b ]

In netlbl_cipsov4_add_std() when 'doi_def->map.std' alloc
failed, we sometime observe panic:

  BUG: kernel NULL pointer dereference, address:
  ...
  RIP: 0010:cipso_v4_doi_free+0x3a/0x80
  ...
  Call Trace:
   netlbl_cipsov4_add_std+0xf4/0x8c0
   netlbl_cipsov4_add+0x13f/0x1b0
   genl_family_rcv_msg_doit.isra.15+0x132/0x170
   genl_rcv_msg+0x125/0x240

This is because in cipso_v4_doi_free() there is no check
on 'doi_def->map.std' when 'doi_def->type' equal 1, which
is possibe, since netlbl_cipsov4_add_std() haven't initialize
it before alloc 'doi_def->map.std'.

This patch just add the check to prevent panic happen for similar
cases.

Reported-by: Abaci <abaci@linux.alibaba.com>
Signed-off-by: Michael Wang <yun.wang@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 11:45:32 +02:00
arch ARM: tegra: tamonten: Fix UART pad setting 2021-09-22 11:45:30 +02:00
block block: bfq: fix bfq_set_next_ioprio_data() 2021-09-22 11:45:24 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-22 11:45:19 +02:00
crypto crypto: shash - avoid comparing pointers to exported functions under CFI 2021-07-20 16:17:32 +02:00
Documentation docs: Fix infiniband uverbs minor number 2021-09-22 11:45:26 +02:00
drivers ath9k: fix sleeping in atomic context 2021-09-22 11:45:32 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs cifs: fix wrong release in sess_alloc_buffer() failed path 2021-09-22 11:45:31 +02:00
include serial: 8250: Define RX trigger levels for OxSemi 950 devices 2021-09-22 11:45:29 +02:00
init pid: take a reference when initializing cad_pid 2021-06-10 12:43:51 +02:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-05-20 08:17:07 +02:00
kernel workqueue: fix UAF in pwq_unbound_release_workfn() 2021-08-04 12:22:14 +02:00
lib bpf/tests: Do not PASS tests without actually testing the result 2021-09-22 11:45:28 +02:00
mm mm/page_alloc: speed up the iteration of max_order 2021-09-22 11:45:16 +02:00
net net: fix NULL pointer reference in cipso_v4_doi_free 2021-09-22 11:45:32 +02:00
samples samples/bpf: Fix the error return code of xdp_redirect's main() 2021-07-20 16:17:37 +02:00
scripts scripts/tracing: fix the bug that can't parse raw_trace_func 2021-08-15 13:03:31 +02:00
security Smack: Fix wrong semantics in smk_access_entry() 2021-09-22 11:45:27 +02:00
sound ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B 2021-09-22 11:45:31 +02:00
tools selftests/bpf: Enlarge select() timeout for test_maps 2021-09-22 11:45:31 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped() 2021-08-08 08:53:29 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile Linux 4.14.246 2021-09-03 09:56:26 +02:00
README

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

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

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.