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 <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240925071426.144015-3-matthew.auld@intel.com
(cherry picked from commit dcfd397)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>1 parent 9e3c85d commit 7423187
1 file changed
Lines changed: 8 additions & 8 deletions
| 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