summary refs log tree commit diff stats
path: root/results/classifier/118/ppc/1661815
diff options
context:
space:
mode:
Diffstat (limited to 'results/classifier/118/ppc/1661815')
-rw-r--r--results/classifier/118/ppc/166181573
1 files changed, 73 insertions, 0 deletions
diff --git a/results/classifier/118/ppc/1661815 b/results/classifier/118/ppc/1661815
new file mode 100644
index 000000000..4c52e8a7b
--- /dev/null
+++ b/results/classifier/118/ppc/1661815
@@ -0,0 +1,73 @@
+ppc: 0.816
+vnc: 0.749
+graphic: 0.734
+performance: 0.728
+device: 0.725
+architecture: 0.705
+user-level: 0.695
+network: 0.677
+permissions: 0.661
+debug: 0.656
+hypervisor: 0.631
+PID: 0.623
+files: 0.617
+peripherals: 0.598
+TCG: 0.578
+register: 0.569
+socket: 0.557
+kernel: 0.556
+semantic: 0.542
+VMM: 0.515
+x86: 0.474
+i386: 0.473
+virtual: 0.454
+KVM: 0.451
+assembly: 0.446
+risc-v: 0.383
+boot: 0.368
+arm: 0.362
+mistranslation: 0.251
+
+Stack address is returned from function translate_one
+
+The vulnerable version is qemu-2.8.0, and the vulnerable function is in "target-s390x/translate.c".
+
+The code snippet is as following.
+
+static ExitStatus translate_one(CPUS390XState *env, DisasContext *s)
+{
+    const DisasInsn *insn;
+    ExitStatus ret = NO_EXIT;
+    DisasFields f;
+    ...
+    s->fields = &f;
+    ...
+    s->pc = s->next_pc;
+    return ret;
+}
+
+A stack address, i.e. the address of local variable "f" is returned from current function through the output parameter "s->fields" as a side effect.
+
+This issue is one kind of undefined behaviors, according the C Standard, 6.2.4 [ISO/IEC 9899:2011] (https://www.securecoding.cert.org/confluence/display/c/DCL30-C.+Declare+objects+with+appropriate+storage+durations)
+
+This dangerous defect may lead to an exploitable vulnerability.
+We suggest sanitizing "s->fields" as null before return.
+
+Note that this issue is reported by shqking and Zhenwei Zou together.
+
+The calling function never uses "->fields", so I do not see a real vulnerability here, is there? Did you use a code analyser for this, or how did you come across this issue?
+
+Thanks for your reply.
+
+Inspired by this issue in apache httpd (https://bz.apache.org/bugzilla/show_bug.cgi?id=59844#c0),
+we customized a checker based on the Clang Static Analyzer to detect such undefined behavior.
+
+Yes. 
+After examining the code carefully, we didn't find any place where the "->fields" is accessed, either. However, we think this kind of defect seems like a 'time bomb' and we'd better fix it just to be on the safe side.
+
+I've finally posted a patch for this:
+https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg05204.html
+
+Fixed here:
+https://git.qemu.org/?p=qemu.git;a=commitdiff;h=344a7f656e8d211cdd6e
+