WSL2-Linux-Kernel/kernel
Tetsuo Handa a47c3c4876 printk: fix possible reuse of va_list variable
commit 988a35f8da upstream.

I noticed that there is a possibility that printk_safe_log_store() causes
kernel oops because "args" parameter is passed to vsnprintf() again when
atomic_cmpxchg() detected that we raced. Fix this by using va_copy().

Link: http://lkml.kernel.org/r/201805112002.GIF21216.OFVHFOMLJtQFSO@I-love.SAKURA.ne.jp
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: dvyukov@google.com
Cc: syzkaller@googlegroups.com
Cc: fengguang.wu@intel.com
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 42a0bb3f71 ("printk/nmi: generic solution for safe printk in NMI")
Cc: 4.7+ <stable@vger.kernel.org> # v4.7+
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:24:49 +02:00
..
bpf bpf: sockmap, fix leaking maps with attached but not detached progs 2018-04-26 11:02:17 +02:00
cgroup cgroup: fix rule checking for threaded mode switching 2018-03-28 18:24:37 +02:00
configs
debug kdb: make "mdr" command repeat 2018-05-30 07:52:41 +02:00
events perf/core: Fix perf_output_read_group() 2018-05-30 07:52:34 +02:00
gcov
irq genirq: Guard handle_bad_irq log messages 2018-03-03 10:24:31 +01:00
livepatch
locking locking/percpu-rwsem: Annotate rwsem ownership transfer by setting RWSEM_OWNER_UNKNOWN 2018-06-21 04:03:00 +09:00
power x86/power: Fix swsusp_arch_resume prototype 2018-04-26 11:02:16 +02:00
printk printk: fix possible reuse of va_list variable 2018-07-03 11:24:49 +02:00
rcu rcu: Call touch_nmi_watchdog() while printing stall warnings 2018-05-30 07:52:39 +02:00
sched sched/deadline: Make the grub_reclaim() function static 2018-06-21 04:03:01 +09:00
time tick/broadcast: Use for_each_cpu() specially on UP kernels 2018-05-22 18:54:00 +02:00
trace tracing: Make the snapshot trigger work with instances 2018-06-05 11:41:56 +02:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
Makefile
acct.c kernel/acct.c: fix the acct->needcheck check in check_free_space() 2018-01-10 09:31:17 +01:00
async.c kernel/async.c: revert "async: simplify lowest_in_progress()" 2018-02-16 20:23:05 +01:00
audit.c audit: return on memory error to avoid null pointer dereference 2018-05-30 07:52:39 +02:00
audit.h
audit_fsnotify.c
audit_tree.c
audit_watch.c
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
compat.c compat: fix 4-byte infoleak via uninitialized struct field 2018-05-16 10:10:26 +02:00
configs.c
context_tracking.c
cpu.c timers: Reinitialize per cpu bases on hotplug 2018-01-02 20:31:15 +01:00
cpu_pm.c
crash_core.c kdump: write correct address of mem_section into vmcoreinfo 2018-01-17 09:45:27 +01:00
crash_dump.c
cred.c
delayacct.c delayacct: Account blkio completion on the correct task 2018-01-23 19:58:13 +01:00
dma.c
elfcore.c
exec_domain.c
exit.c kernel/exit.c: export abort() to modules 2018-02-13 10:19:49 +01:00
extable.c
fork.c kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2018-02-22 15:42:23 +01:00
freezer.c
futex.c futex: Fix OWNER_DEAD fixup 2018-02-03 17:38:47 +01:00
futex_compat.c
groups.c
hung_task.c
irq_work.c
jump_label.c
kallsyms.c
kcmp.c
kcov.c kcov: detect double association with a single task 2018-02-25 11:07:50 +01:00
kexec.c
kexec_core.c
kexec_file.c
kexec_internal.h
kmod.c
kprobes.c
ksysfs.c
kthread.c kthread, sched/wait: Fix kthread_parkme() wait-loop 2018-06-21 04:02:53 +09:00
latencytop.c
memremap.c mm: Fix memory size alignment in devm_memremap_pages_release() 2018-02-22 15:42:27 +01:00
module-internal.h
module.c init: fix false positives in W+X checking 2018-06-21 04:02:57 +09:00
module_signing.c
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid.c
pid_namespace.c
profile.c
ptrace.c
range.c
reboot.c
relay.c kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE 2018-05-30 07:52:00 +02:00
resource.c resource: fix integer overflow at reallocation 2018-04-24 09:36:22 +02:00
seccomp.c seccomp: Move speculation migitation control to arch code 2018-05-22 18:54:04 +02:00
signal.c sched/core: Introduce set_special_state() 2018-06-21 04:02:54 +09:00
smp.c
smpboot.c
smpboot.h
softirq.c kmemcheck: rip it out 2018-02-22 15:42:24 +01:00
stacktrace.c
stop_machine.c stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock 2018-06-21 04:02:53 +09:00
sys.c kernel/sys.c: fix potential Spectre v1 issue 2018-05-30 07:51:50 +02:00
sys_ni.c
sysctl.c kmemcheck: rip it out 2018-02-22 15:42:24 +01:00
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c tracepoint: Do not warn on ENOMEM 2018-05-09 09:51:50 +02:00
tsacct.c
ucount.c
uid16.c
umh.c
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c
watchdog_hld.c
workqueue.c workqueue: use put_device() instead of kfree() 2018-05-30 07:52:14 +02:00
workqueue_internal.h