Commit 91c6dc5
drm/amdkfd: validate SVM ioctl nattr against buffer size
commit 045e0ff upstream.
Validate nattr field against the buffer size, preventing
out-of-bounds buffer access via user-controlled attribute count.
Reviewed-by: Amir Shetaia <Amir.Shetaia@amd.com>
Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5eca8bf)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 6b99259 commit 91c6dc5
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
1705 | 1706 | | |
1706 | 1707 | | |
1707 | 1708 | | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1708 | 1719 | | |
1709 | 1720 | | |
1710 | 1721 | | |
| |||
3128 | 3139 | | |
3129 | 3140 | | |
3130 | 3141 | | |
3131 | | - | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
3132 | 3147 | | |
3133 | 3148 | | |
3134 | 3149 | | |
| |||
3225 | 3240 | | |
3226 | 3241 | | |
3227 | 3242 | | |
3228 | | - | |
| 3243 | + | |
| 3244 | + | |
3229 | 3245 | | |
3230 | 3246 | | |
3231 | 3247 | | |
| |||
3347 | 3363 | | |
3348 | 3364 | | |
3349 | 3365 | | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
3350 | 3372 | | |
3351 | 3373 | | |
3352 | 3374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
1009 | 1011 | | |
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
| 1015 | + | |
1013 | 1016 | | |
1014 | 1017 | | |
1015 | 1018 | | |
| |||
0 commit comments