Skip to content

Commit b6605ba

Browse files
committed
pkg/report: skip crypto frames for KMSAN reports
This bug is at least one case where we merge several different KMSAN reports because they end up being triggered in the same generic code: https://syzkaller.appspot.com/bug?id=6290a184e96e8fb4b657700adcd243ef195113e1 Skip some common symbols from crypto/ so that the titles become more specific.
1 parent ff1712f commit b6605ba

File tree

3 files changed

+187
-3
lines changed

3 files changed

+187
-3
lines changed

pkg/report/linux.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,11 @@ var linuxOopses = append([]*oops{
15111511
compile("(Local variable .* created at:|Uninit was created at:)"),
15121512
parseStackTrace,
15131513
},
1514-
skip: []string{"alloc_skb", "netlink_ack", "netlink_rcv_skb"},
1514+
skip: []string{
1515+
"alloc_skb", "netlink_ack", "netlink_rcv_skb",
1516+
// Encryption routines are the place where we hit the bug, but
1517+
// the generic code is a bad candidate for bug titles.
1518+
"_encrypt$", "^(?:crypto|cipher|drbg|rng)_"},
15151519
},
15161520
noStackTrace: true,
15171521
},

pkg/report/testdata/linux/report/699

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
TITLE: KMSAN: uninit-value in aes_encrypt
2-
ALT: bad-access in aes_encrypt
1+
TITLE: KMSAN: uninit-value in fscrypt_crypt_block
2+
ALT: bad-access in fscrypt_crypt_block
33
TYPE: KMSAN-UNINIT-VALUE
44

55
[ 311.903743][ T5388] =====================================================
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
TITLE: KMSAN: uninit-value in alg_setkey
2+
ALT: bad-access in alg_setkey
3+
TYPE: KMSAN-UNINIT-VALUE
4+
EXECUTOR: proc=2, id=690
5+
6+
7+
=====================================================
8+
BUG: KMSAN: uninit-value in aes_encrypt+0x1239/0x1960
9+
aes_encrypt+0x1239/0x1960
10+
aesti_encrypt+0x7d/0xf0
11+
cipher_crypt_one+0x120/0x2e0
12+
crypto_cipher_encrypt_one+0x33/0x40
13+
drbg_ctr_update+0x19a9/0x3700
14+
drbg_seed+0xb1e/0xe20
15+
drbg_kcapi_seed+0x19b2/0x1e40
16+
crypto_rng_reset+0x193/0x250
17+
rng_setkey+0x52/0x70
18+
alg_setkey+0x265/0x3b0
19+
alg_setsockopt+0x503/0x760
20+
__sys_setsockopt+0x43e/0x580
21+
__x64_sys_setsockopt+0xf4/0x1a0
22+
x64_sys_call+0x27c9/0x3e30
23+
do_syscall_64+0xd9/0x210
24+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
25+
26+
<Zero or more stacks not recorded to save memory>
27+
28+
Uninit was stored to memory at:
29+
crypto_sha3_finup+0x136/0xe00
30+
crypto_shash_finup+0x327/0xe80
31+
jent_hash_time+0x247/0x590
32+
jent_condition_data+0x4f0/0x510
33+
jent_measure_jitter+0x547/0x770
34+
jent_gen_entropy+0x209/0x450
35+
jent_read_entropy+0x353/0xeb0
36+
jent_kcapi_random+0x6c/0x250
37+
drbg_seed+0x3f5/0xe20
38+
drbg_kcapi_seed+0x19b2/0x1e40
39+
crypto_rng_reset+0x193/0x250
40+
rng_setkey+0x52/0x70
41+
alg_setkey+0x265/0x3b0
42+
alg_setsockopt+0x503/0x760
43+
__sys_setsockopt+0x43e/0x580
44+
__x64_sys_setsockopt+0xf4/0x1a0
45+
x64_sys_call+0x27c9/0x3e30
46+
do_syscall_64+0xd9/0x210
47+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
48+
49+
Uninit was stored to memory at:
50+
crypto_shash_finup+0xc5a/0xe80
51+
jent_hash_time+0x1de/0x590
52+
jent_condition_data+0x4f0/0x510
53+
jent_measure_jitter+0x547/0x770
54+
jent_gen_entropy+0x209/0x450
55+
jent_read_entropy+0x353/0xeb0
56+
jent_kcapi_random+0x6c/0x250
57+
drbg_seed+0x3f5/0xe20
58+
drbg_kcapi_seed+0x19b2/0x1e40
59+
crypto_rng_reset+0x193/0x250
60+
rng_setkey+0x52/0x70
61+
alg_setkey+0x265/0x3b0
62+
alg_setsockopt+0x503/0x760
63+
__sys_setsockopt+0x43e/0x580
64+
__x64_sys_setsockopt+0xf4/0x1a0
65+
x64_sys_call+0x27c9/0x3e30
66+
do_syscall_64+0xd9/0x210
67+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
68+
69+
Uninit was stored to memory at:
70+
crypto_sha3_finup+0xc98/0xe00
71+
crypto_shash_finup+0x327/0xe80
72+
jent_hash_time+0x247/0x590
73+
jent_condition_data+0x4f0/0x510
74+
jent_measure_jitter+0x547/0x770
75+
jent_gen_entropy+0x209/0x450
76+
jent_read_entropy+0x353/0xeb0
77+
jent_kcapi_random+0x6c/0x250
78+
drbg_seed+0x3f5/0xe20
79+
drbg_kcapi_seed+0x19b2/0x1e40
80+
crypto_rng_reset+0x193/0x250
81+
rng_setkey+0x52/0x70
82+
alg_setkey+0x265/0x3b0
83+
alg_setsockopt+0x503/0x760
84+
__sys_setsockopt+0x43e/0x580
85+
__x64_sys_setsockopt+0xf4/0x1a0
86+
x64_sys_call+0x27c9/0x3e30
87+
do_syscall_64+0xd9/0x210
88+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
89+
90+
Uninit was stored to memory at:
91+
keccakf+0x1efb/0x2110
92+
crypto_sha3_finup+0x772/0xe00
93+
crypto_shash_finup+0x327/0xe80
94+
jent_hash_time+0x247/0x590
95+
jent_condition_data+0x4f0/0x510
96+
jent_measure_jitter+0x547/0x770
97+
jent_gen_entropy+0x209/0x450
98+
jent_read_entropy+0x353/0xeb0
99+
jent_kcapi_random+0x6c/0x250
100+
drbg_seed+0x3f5/0xe20
101+
drbg_kcapi_seed+0x19b2/0x1e40
102+
crypto_rng_reset+0x193/0x250
103+
rng_setkey+0x52/0x70
104+
alg_setkey+0x265/0x3b0
105+
alg_setsockopt+0x503/0x760
106+
__sys_setsockopt+0x43e/0x580
107+
__x64_sys_setsockopt+0xf4/0x1a0
108+
x64_sys_call+0x27c9/0x3e30
109+
do_syscall_64+0xd9/0x210
110+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
111+
112+
Uninit was stored to memory at:
113+
crypto_sha3_finup+0x5be/0xe00
114+
crypto_shash_finup+0x327/0xe80
115+
jent_hash_time+0x247/0x590
116+
jent_condition_data+0x4f0/0x510
117+
jent_measure_jitter+0x547/0x770
118+
jent_gen_entropy+0x209/0x450
119+
jent_read_entropy+0x353/0xeb0
120+
jent_kcapi_random+0x6c/0x250
121+
drbg_seed+0x3f5/0xe20
122+
drbg_kcapi_seed+0x19b2/0x1e40
123+
crypto_rng_reset+0x193/0x250
124+
rng_setkey+0x52/0x70
125+
alg_setkey+0x265/0x3b0
126+
alg_setsockopt+0x503/0x760
127+
__sys_setsockopt+0x43e/0x580
128+
__x64_sys_setsockopt+0xf4/0x1a0
129+
x64_sys_call+0x27c9/0x3e30
130+
do_syscall_64+0xd9/0x210
131+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
132+
133+
Uninit was stored to memory at:
134+
crypto_sha3_finup+0x136/0xe00
135+
crypto_shash_finup+0x327/0xe80
136+
jent_hash_time+0x247/0x590
137+
jent_condition_data+0x4f0/0x510
138+
jent_measure_jitter+0x547/0x770
139+
jent_gen_entropy+0x209/0x450
140+
jent_read_entropy+0x353/0xeb0
141+
jent_kcapi_random+0x6c/0x250
142+
drbg_seed+0x3f5/0xe20
143+
drbg_kcapi_seed+0x19b2/0x1e40
144+
crypto_rng_reset+0x193/0x250
145+
rng_setkey+0x52/0x70
146+
alg_setkey+0x265/0x3b0
147+
alg_setsockopt+0x503/0x760
148+
__sys_setsockopt+0x43e/0x580
149+
__x64_sys_setsockopt+0xf4/0x1a0
150+
x64_sys_call+0x27c9/0x3e30
151+
do_syscall_64+0xd9/0x210
152+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
153+
154+
Uninit was stored to memory at:
155+
crypto_shash_finup+0xc5a/0xe80
156+
jent_hash_time+0x1de/0x590
157+
jent_condition_data+0x4f0/0x510
158+
jent_measure_jitter+0x547/0x770
159+
jent_gen_entropy+0x209/0x450
160+
jent_read_entropy+0x353/0xeb0
161+
jent_kcapi_random+0x6c/0x250
162+
drbg_seed+0x3f5/0xe20
163+
drbg_kcapi_seed+0x19b2/0x1e40
164+
crypto_rng_reset+0x193/0x250
165+
rng_setkey+0x52/0x70
166+
alg_setkey+0x265/0x3b0
167+
alg_setsockopt+0x503/0x760
168+
__sys_setsockopt+0x43e/0x580
169+
__x64_sys_setsockopt+0xf4/0x1a0
170+
x64_sys_call+0x27c9/0x3e30
171+
do_syscall_64+0xd9/0x210
172+
entry_SYSCALL_64_after_hwframe+0x77/0x7f
173+
174+
Local variable intermediary created at:
175+
jent_hash_time+0x9b/0x590
176+
jent_condition_data+0x4f0/0x510
177+
178+
CPU: 0 UID: 0 PID: 8436 Comm: syz.2.690 Not tainted syzkaller #0 PREEMPT(none)
179+
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
180+
=====================================================

0 commit comments

Comments
 (0)