summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/semantic-x86/1374
blob: a4f364474cc4a8a14bca943b59deae003a5a5811 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
x86: 0.997
semantic: 0.993
graphic: 0.807
architecture: 0.761
register: 0.732
device: 0.700
assembly: 0.661
ppc: 0.428
arm: 0.388
boot: 0.382
vnc: 0.341
debug: 0.324
socket: 0.314
kernel: 0.307
network: 0.272
mistranslation: 0.272
permissions: 0.246
risc-v: 0.238
peripherals: 0.199
i386: 0.198
performance: 0.192
PID: 0.155
files: 0.078
virtual: 0.061
VMM: 0.045
KVM: 0.044
TCG: 0.038
user-level: 0.022
hypervisor: 0.019
--------------------
x86: 1.000
i386: 0.993
semantic: 0.988
assembly: 0.970
debug: 0.228
register: 0.206
kernel: 0.077
files: 0.043
performance: 0.042
TCG: 0.033
user-level: 0.031
virtual: 0.025
architecture: 0.018
hypervisor: 0.013
peripherals: 0.012
device: 0.012
PID: 0.011
VMM: 0.008
network: 0.007
boot: 0.006
risc-v: 0.005
socket: 0.005
permissions: 0.005
KVM: 0.005
graphic: 0.003
vnc: 0.001
ppc: 0.001
mistranslation: 0.001
arm: 0.000

x86 BZHI semantic bug
Description of problem:
The result of instruction BZHI is different from the CPU. The value of destination register and SF of EFLAGS are different.
Steps to reproduce:
1. Compile this code
```
void main() {
    asm("mov rax, 0xb1aa9da2fe33fe3");
    asm("mov rbx, 0x80000000ffffffff");
    asm("mov rcx, 0xf3fce8829b99a5c6");
    asm("bzhi rax, rbx, rcx");
}
```
2. Execute and compare the result with the CPU.
    - CPU
        - RAX = 0x0x80000000ffffffff
        - SF = 1
    - QEMU
        - RAX = 0xffffffff
        - SF = 0
Additional information:
This bug is discovered by research conducted by KAIST SoftSec.