[PW_SID:996013] kexec: Fix invalid field access - #841
Conversation
The kexec_buf structure was previously declared without initialization. commit bf454ec ("kexec_file: allow to place kexec_buf randomly") added a field that is always read but not consistently populated by all architectures. This un-initialized field will contain garbage. This is also triggering a UBSAN warning when the uninitialized data was accessed: ------------[ cut here ]------------ UBSAN: invalid-load in ./include/linux/kexec.h:210:10 load of value 252 is not a valid value for type '_Bool' Zero-initializing kexec_buf at declaration ensures all fields are cleanly set, preventing future instances of uninitialized memory being used. Signed-off-by: Breno Leitao <leitao@debian.org> Fixes: bf454ec ("kexec_file: allow to place kexec_buf randomly") Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The kexec_buf structure was previously declared without initialization. commit bf454ec ("kexec_file: allow to place kexec_buf randomly") added a field that is always read but not consistently populated by all architectures. This un-initialized field will contain garbage. This is also triggering a UBSAN warning when the uninitialized data was accessed: ------------[ cut here ]------------ UBSAN: invalid-load in ./include/linux/kexec.h:210:10 load of value 252 is not a valid value for type '_Bool' Zero-initializing kexec_buf at declaration ensures all fields are cleanly set, preventing future instances of uninitialized memory being used. Fixes: bf454ec ("kexec_file: allow to place kexec_buf randomly") Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The kexec_buf structure was previously declared without initialization. commit bf454ec ("kexec_file: allow to place kexec_buf randomly") added a field that is always read but not consistently populated by all architectures. This un-initialized field will contain garbage. This is also triggering a UBSAN warning when the uninitialized data was accessed: ------------[ cut here ]------------ UBSAN: invalid-load in ./include/linux/kexec.h:210:10 load of value 252 is not a valid value for type '_Bool' Zero-initializing kexec_buf at declaration ensures all fields are cleanly set, preventing future instances of uninitialized memory being used. Fixes: bf454ec ("kexec_file: allow to place kexec_buf randomly") Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 1: "[1/3] arm64: kexec: Initialize kexec_buf struct in load_other_segments()" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 2: "[2/3] riscv: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
|
Patch 3: "[3/3] s390: kexec: Initialize kexec_buf struct" |
PR for series 996013 applied to workflow__riscv__fixes
Name: kexec: Fix invalid field access
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=996013
Version: 1