Revision d81916910f7498fe7a768697e0101d488f9fe665 authored by Yang Yingliang on 29 October 2022, 08:29:31 UTC, committed by Huacai Chen on 29 October 2022, 08:29:31 UTC
Currently the return value of 'sub_driver->init' is not checked. If sparse_keymap_setup() called in the init function fails, 'generic_ inputdev' is freed, then it will lead a UAF when using it in generic_ acpi_laptop_init(). Fix it by checking the return value and setting generic_inputdev to NULL after free, so as to avoid double free it. The error code in generic_subdriver_init() is always negative, so the return of generic_subdriver_init() can be simplified. Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent fbe605a
File | Mode | Size |
---|---|---|
6fire | ||
bcd2000 | ||
caiaq | ||
hiface | ||
line6 | ||
misc | ||
usx2y | ||
Kconfig | -rw-r--r-- | 4.7 KB |
Makefile | -rw-r--r-- | 817 bytes |
card.c | -rw-r--r-- | 32.3 KB |
card.h | -rw-r--r-- | 8.2 KB |
clock.c | -rw-r--r-- | 16.1 KB |
clock.h | -rw-r--r-- | 474 bytes |
endpoint.c | -rw-r--r-- | 48.1 KB |
endpoint.h | -rw-r--r-- | 2.3 KB |
format.c | -rw-r--r-- | 21.4 KB |
format.h | -rw-r--r-- | 489 bytes |
helper.c | -rw-r--r-- | 2.8 KB |
helper.h | -rw-r--r-- | 1.3 KB |
implicit.c | -rw-r--r-- | 14.4 KB |
implicit.h | -rw-r--r-- | 478 bytes |
media.c | -rw-r--r-- | 8.1 KB |
media.h | -rw-r--r-- | 2.4 KB |
midi.c | -rw-r--r-- | 72.3 KB |
midi.h | -rw-r--r-- | 2.0 KB |
mixer.c | -rw-r--r-- | 98.0 KB |
mixer.h | -rw-r--r-- | 3.7 KB |
mixer_maps.c | -rw-r--r-- | 21.1 KB |
mixer_quirks.c | -rw-r--r-- | 95.5 KB |
mixer_quirks.h | -rw-r--r-- | 631 bytes |
mixer_s1810c.c | -rw-r--r-- | 15.3 KB |
mixer_s1810c.h | -rw-r--r-- | 210 bytes |
mixer_scarlett.c | -rw-r--r-- | 28.1 KB |
mixer_scarlett.h | -rw-r--r-- | 208 bytes |
mixer_scarlett_gen2.c | -rw-r--r-- | 113.6 KB |
mixer_scarlett_gen2.h | -rw-r--r-- | 217 bytes |
mixer_us16x08.c | -rw-r--r-- | 37.3 KB |
mixer_us16x08.h | -rw-r--r-- | 4.0 KB |
pcm.c | -rw-r--r-- | 46.2 KB |
pcm.h | -rw-r--r-- | 540 bytes |
power.c | -rw-r--r-- | 2.5 KB |
power.h | -rw-r--r-- | 743 bytes |
proc.c | -rw-r--r-- | 7.3 KB |
proc.h | -rw-r--r-- | 250 bytes |
quirks-table.h | -rw-r--r-- | 103.5 KB |
quirks.c | -rw-r--r-- | 69.8 KB |
quirks.h | -rw-r--r-- | 1.6 KB |
stream.c | -rw-r--r-- | 32.1 KB |
stream.h | -rw-r--r-- | 325 bytes |
usbaudio.h | -rw-r--r-- | 6.1 KB |
validate.c | -rw-r--r-- | 10.0 KB |
Computing file changes ...