Go to file
Wang Hai 64ec3e678d video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe()
[ Upstream commit 1791f487f877a9e83d81c8677bd3e7b259e7cb27 ]

I got a null-ptr-deref report:

BUG: kernel NULL pointer dereference, address: 0000000000000000
...
RIP: 0010:fb_destroy_modelist+0x38/0x100
...
Call Trace:
 ufx_usb_probe.cold+0x2b5/0xac1 [smscufx]
 usb_probe_interface+0x1aa/0x3c0 [usbcore]
 really_probe+0x167/0x460
...
 ret_from_fork+0x1f/0x30

If fb_alloc_cmap() fails in ufx_usb_probe(), fb_destroy_modelist() will
be called to destroy modelist in the error handling path. But modelist
has not been initialized yet, so it will result in null-ptr-deref.

Initialize modelist before calling fb_alloc_cmap() to fix this bug.

Fixes: 3c8a63e22a ("Add support for SMSC UFX6000/7000 USB display adapters")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:40:06 +02:00
arch perf/x86/intel/pt: Fix address filter config for 32-bit kernel 2022-04-08 14:40:04 +02:00
block block: don't delete queue kobject before its children 2022-04-08 14:40:00 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-15 09:50:29 +02:00
crypto crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-08 14:39:59 +02:00
Documentation Documentation: update stable tree link 2022-04-08 14:39:50 +02:00
drivers video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe() 2022-04-08 14:40:06 +02:00
fs f2fs: fix compressed file start atomic write may cause data corruption 2022-04-08 14:40:04 +02:00
include rseq: Remove broken uapi field layout on 32-bit little endian 2022-04-08 14:40:03 +02:00
init bpf: Add kconfig knob for disabling unpriv bpf by default 2022-01-05 12:40:34 +01:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-12-01 09:19:10 +01:00
kernel perf/core: Fix address filter parser for multiple filters 2022-04-08 14:40:03 +02:00
lib kunit: make kunit_test_timeout compatible with comment 2022-04-08 14:40:04 +02:00
LICENSES
mm mm/kmemleak: reset tag when compare object pointer 2022-04-08 14:39:54 +02:00
net udp: call udp_encap_enable for v6 sockets when enabling encap 2022-04-08 14:39:54 +02:00
samples ftrace/samples: Add missing prototypes direct functions 2022-01-11 15:25:00 +01:00
scripts kconfig: fix failing to generate auto.conf 2022-02-23 12:01:07 +01:00
security EVM: fix the evm= __setup handler return value 2022-04-08 14:40:00 +02:00
sound ASoC: generic: simple-card-utils: remove useless assignment 2022-04-08 14:40:05 +02:00
tools selftests, x86: fix how check_cc.sh is being invoked 2022-04-08 14:40:04 +02:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:25:48 +01:00
virt KVM: eventfd: Fix false positive RCU usage warning 2022-02-16 12:54:20 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: adjust GCC PLUGINS after gcc-plugin.sh removal 2021-12-14 11:32:46 +01:00
Makefile Linux 5.10.109 2022-03-28 09:57:11 +02:00
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.