1
From: Denis Rastyogin <gerben@altlinux.org>
1
From: Denis Rastyogin <gerben@altlinux.org>
2
2
3
Accessing an element of the s->core_registers array,
3
Accessing an element of the s->core_registers array,
4
which has a size of 236 (0x3AC), may lead to a buffer overflow
4
which has a size of 236 (0x3AC), may lead to a buffer overflow
5
if the 'offset' index exceeds the valid range, potentially
5
if the 'offset' index exceeds the valid range, potentially
6
reaching values up to 5139 (0x504C >> 2). Therefore, the bounds
6
reaching values up to 5139 (0x504C >> 2). The bounds check
7
check has been extended to DP_CORE_REG_ARRAY_SIZE (0x3B0 >> 2).
7
has been extended to DP_CORE_REG_ARRAY_SIZE (0x3B0 >> 2)
8
This change addresses a potential vulnerability by ensuring
8
to ensure the offset remains within the valid range before writing data.
9
the offset stays within the valid range before writing data.
9
10
The memory region is registered to match the size of
11
the core_registers array. This ensures that the guest cannot issue
12
an out-of-bounds write. Therefore, using `assert` remains appropriate
13
to catch internal violations.
10
14
11
Found by Linux Verification Center (linuxtesting.org) with SVACE.
15
Found by Linux Verification Center (linuxtesting.org) with SVACE.
12
16
13
Reported-by: David Meliksetyan <d.meliksetyan@fobos-nt.ru>
17
Reported-by: David Meliksetyan <d.meliksetyan@fobos-nt.ru>
14
Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
18
Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
...
...
diff view generated by jsdifflib