Commit 9c85743
msm: kgsl: Prevent wrap around during user address mapping
When setting svm region during the gpuobj import ioctl call for a usermem
address, there is a possibility of a very large input size causing the
region's 64-bit end address to wrap around. This can cause the region
to incorrectly be considered valid, ultimately allowing a use after free
scenario. To prevent this, detect the occurrence of a wrap and reject the
import.
Change-Id: I4a88f56c58b830d4342e47dc1d1f6290c78ab6b4
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Puranam V G Tejaswi <quic_pvgtejas@quicinc.com>1 parent 81d9db8 commit 9c85743
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
2422 | 2422 | | |
2423 | 2423 | | |
2424 | 2424 | | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
2425 | 2431 | | |
2426 | | - | |
2427 | | - | |
| 2432 | + | |
2428 | 2433 | | |
2429 | 2434 | | |
2430 | 2435 | | |
2431 | | - | |
2432 | | - | |
| 2436 | + | |
2433 | 2437 | | |
2434 | 2438 | | |
2435 | 2439 | | |
| |||
0 commit comments