UBUNTU-CVE-2026-93049: Medium severity ubuntu/linux-azure vulnerability
In the Linux kernel, the following vulnerability has been resolved: mtd: mtdswap: Avoid freeing registered blktrans device twice In mtdswapaddmtd(), debugfs setup failure after successful blktrans registration can free mbddev twice. addmtdblktransdev() initializes the blktrans device reference and publishes the disk. Once that succeeds, delmtdblktransdev() tears the disk down and drops the blktrans reference; when that reference reaches zero, blktransdevrelease() frees the mtdblktransdev. The debugfs failure path called delmtdblktransdev(mbddev), then fell through the common cleanup label and called kfree(mbddev) again. Clear the local pointer after deregistration so the common cleanup can still release the mtdswap state without freeing the blktrans object twice. This issue was found by a static analysis checker and confirmed by manual source review.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In mtdswap_add_mtd()'s debugfs setup failure path, clear the local mbd_dev pointer immediately after calling del_mtd_blktrans_dev(mbd_dev), preventing common cleanup from freeing the blktrans object twice while still releasing mtdswap state.