dm: fix resume-vs-remove race
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3f77316de0ec0fd208467fbee8d9edc70e2c73b2 · < 36177beff2a9df035991ad8d16ccf8d363ed93ee| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dm: fix resume-vs-remove race
If the user issues the resume ioctl and the remove ioctl at the same time, it may be possible that the device is resumed after it is suspended in __dm_destroy. The result is that the table is destroyed without calling the postsuspend method.
Dm targets expect that they may be removed only after the postsuspend method method was called. If we break this expectation, it can cause misbehavior in various targets. For example - in the dm-integrity target, the reboot notifier is not unregistered, leading to use-after-free.
Fix this bug by refusing to resume if the device is being destroyed.
From the CVE record · Linux
A race between device-mapper resume and remove ioctls can destroy a table without calling its postsuspend method. A local user who can issue these ioctls concurrently may trigger target misbehavior, including a use-after-free in dm-integrity. The input does not specify authentication requirements beyond the ability to issue the ioctls.
Teams running the Linux kernel should check whether their kernel is affected; affected versions were not provided.