linux/arch/arm64
Julien Grall f228b494e5 arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str
The loop that browses the array compat_hwcap_str will stop when a NULL
is encountered, however NULL is missing at the end of array. This will
lead to overrun until a NULL is found somewhere in the following memory.
In reality, this works out because the compat_hwcap2_str array tends to
follow immediately in memory, and that *is* terminated correctly.
Furthermore, the unsigned int compat_elf_hwcap is checked before
printing each capability, so we end up doing the right thing because
the size of the two arrays is less than 32. Still, this is an obvious
mistake and should be fixed.

Note for backporting: commit 12d11817ea ("arm64: Move
/proc/cpuinfo handling code") moved this code in v4.4. Prior to that
commit, the same change should be made in arch/arm64/kernel/setup.c.

Fixes: 44b82b7700 "arm64: Fix up /proc/cpuinfo"
Cc: <stable@vger.kernel.org> # v3.19+ (but see note above prior to v4.4)
Signed-off-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-05-11 10:26:30 +01:00
..
boot ARM: DT changes, part 2 2016-03-24 19:01:38 -07:00
configs arm64: defconfig: updates for 4.6 2016-03-29 16:56:00 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
include arm64: Ensure pmd_present() returns false after pmd_mknotpresent() 2016-05-06 12:46:53 +01:00
kernel arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str 2016-05-11 10:26:30 +01:00
kvm arm64: kvm: Fix kvm teardown for systems using the extended idmap 2016-05-03 09:50:27 +01:00
lib arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00
mm arm64: mm: remove unnecessary EXPORT_SYMBOL_GPL 2016-05-05 09:49:38 +01:00
net arm64: bpf: add extra pass to handle faulty codegen 2016-01-17 19:15:26 -05:00
xen xen/arm: introduce HYPERVISOR_platform_op on arm and arm64 2015-12-21 14:40:56 +00:00
Kconfig arm64: kconfig: drop CONFIG_RTC_LIB dependency 2016-04-28 19:43:37 +01:00
Kconfig.debug arm64: simplify kernel segment mapping granularity 2016-04-14 18:11:44 +01:00
Kconfig.platforms Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-24 10:29:44 -07:00
Makefile arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00