Description
In the Linux kernel, the following vulnerability has been resolved: accel/amdxdna: put the chained BO when its mapping fails amdxdna_cmd_set_error() looks up the first BO of a command chain, which takes a reference, and drops it at the end of the function. The mapping of that BO is established in between, and the failure path returns without the put, so the reference is leaked. Ordinary use does not reach it. The chain has been submitted before any of this runs, so aie2_cmdlist_fill_slot() has already called amdxdna_cmd_get_op() on that BO and amdxdna_gem_vmap() has cached its address. What makes it reachable is that the BO is resolved again by handle here, and the handle is userspace's to recycle: closing it after submission and importing a dma-buf whose exporter implements no vmap onto the same id leaves amdxdna_gem_get_obj() returning an object this cannot map, since prime_import() types every import AMDXDNA_BO_SHARE.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
d76856beb4a4a6c42244054cd780c00f2d33de4e to < eb90cb257e0792ac11f0347254bad3fc72417db6affectedd76856beb4a4a6c42244054cd780c00f2d33de4e to < 7e33ba3a1d48c2d20ed270dec9d2d08332585c8eaffected33819cca7b76d5c2385c054f054c4b672ab989d5affected6.18.57 to < 6.19affected
Linux Linux
Default version status: affected
7.1affected0 to < 7.1unaffected7.2.7 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected