Commit 7423187
drm/xe/vm: move xa_alloc to prevent UAF
Evil user can guess the next id of the vm before the ioctl completes and
then call vm destroy ioctl to trigger UAF since create ioctl is still
referencing the same vm. Move the xa_alloc all the way to the end to
prevent this.
v2:
- Rebase
Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: <[email protected]> # v6.8+
Reviewed-by: Nirmoy Das <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit dcfd397)
Signed-off-by: Lucas De Marchi <[email protected]>1 parent 9e3c85d commit 7423187
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1765 | 1765 | | |
1766 | 1766 | | |
1767 | 1767 | | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | 1768 | | |
1773 | 1769 | | |
1774 | 1770 | | |
1775 | 1771 | | |
1776 | 1772 | | |
1777 | 1773 | | |
1778 | 1774 | | |
1779 | | - | |
| 1775 | + | |
1780 | 1776 | | |
1781 | 1777 | | |
1782 | 1778 | | |
1783 | 1779 | | |
1784 | | - | |
1785 | 1780 | | |
1786 | 1781 | | |
1787 | 1782 | | |
| |||
1794 | 1789 | | |
1795 | 1790 | | |
1796 | 1791 | | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
1797 | 1799 | | |
1798 | 1800 | | |
1799 | | - | |
1800 | | - | |
1801 | 1801 | | |
1802 | 1802 | | |
1803 | 1803 | | |
| |||
0 commit comments