summary refs log tree commit diff stats
path: root/results/classifier/zero-shot-user-mode/instruction/1661815
blob: 29e0b71584c3a02c556ab019d71d6fdf2dd0122d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
instruction: 0.463
runtime: 0.318
syscall: 0.219



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.