linux-stable/arch
Alexander Sverdlin 0f12166872 ep93xx: clock: Fix UAF in ep93xx_clk_register_gate()
commit 3b68b08885 upstream.

arch/arm/mach-ep93xx/clock.c:154:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
arch/arm/mach-ep93xx/clock.c:151:2: note: Taking true branch
if (IS_ERR(clk))
^
arch/arm/mach-ep93xx/clock.c:152:3: note: Memory is released
kfree(psc);
^~~~~~~~~~
arch/arm/mach-ep93xx/clock.c:154:2: note: Use of memory after it is freed
return &psc->hw;
^ ~~~~~~~~

Fixes: 9645ccc7bd ("ep93xx: clock: convert in-place to COMMON_CLK")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/B5YCO2NJEXINCYE26Y255LCVMO55BGWW/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:36:26 +02:00
..
alpha bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
arc uaccess: fix type mismatch warnings from access_ok() 2022-04-08 13:58:44 +02:00
arm ep93xx: clock: Fix UAF in ep93xx_clk_register_gate() 2022-04-20 09:36:26 +02:00
arm64 arm64: alternatives: mark patch_alternative() as `noinstr` 2022-04-20 09:36:21 +02:00
csky uaccess: fix type mismatch warnings from access_ok() 2022-04-08 13:58:44 +02:00
h8300 bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
hexagon uaccess: fix integer overflow on access_ok() 2022-03-28 10:03:21 +02:00
ia64 ia64: make IA64_MCA_RECOVERY bool instead of tristate 2022-01-30 09:56:58 +02:00
m68k m68k: coldfire/device.c: only build for MCF_EDMA when h/w macros are defined 2022-04-08 13:57:51 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 13:57:49 +02:00
mips MIPS: ingenic: correct unit node address 2022-04-13 19:27:22 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 10:03:22 +02:00
nios2 uaccess: fix type mismatch warnings from access_ok() 2022-04-08 13:58:44 +02:00
openrisc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
parisc parisc: Fix patch code locking and flushing 2022-04-13 19:27:27 +02:00
powerpc static_call: Properly initialise DEFINE_STATIC_CALL_RET0() 2022-04-20 09:36:21 +02:00
riscv RISC-V: KVM: include missing hwcap.h into vcpu_fp 2022-04-20 09:36:14 +02:00
s390 KVM: s390x: fix SCK locking 2022-04-08 13:57:30 +02:00
sh bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
sparc uaccess: fix type mismatch warnings from access_ok() 2022-04-08 13:58:44 +02:00
um um: fix and optimize xor select template for CONFIG64 and timetravel mode 2022-04-13 19:27:06 +02:00
x86 x86/tsx: Disable TSX development mode at boot 2022-04-20 09:36:26 +02:00
xtensa xtensa: fix DTC warning unit_address_format 2022-04-13 19:27:22 +02:00
.gitignore
Kconfig stack: Constrain and fix stack offset randomization with Clang builds 2022-04-08 13:57:34 +02:00