Linux
of: unittest: fix use-after-free in of_unittest_changeset()
In the Linux kernel, the following vulnerability has been resolved: of: unittest: fix use-after-free in of_unittest_changeset() The variable 'parent' is assigned the value of 'nchangeset' earlier in the function, meaning both point to the same struct device_node. The call to of_node_put(nchangeset) can decrement the reference count to zero and free the node if there are no other holders. After that, the code still uses 'parent' to check for the presence of a property and to read a string property, leading to a use-after-free. Fix this by moving the of_node_put() call after the last access to 'parent', avoiding the UAF.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1c668ea65506e67ce2eae07b69bb09fcdd86e309, < 37318d1a27c9cc5a70d3cd7e49e30ec86f2b8ca1
- >= 1c668ea65506e67ce2eae07b69bb09fcdd86e309, < 7f0f0926f3010b10cff5e93446258f971e42f2fd
- >= 1c668ea65506e67ce2eae07b69bb09fcdd86e309, < 6fdad20b7975bdc32e85b45f8f7c640f6687b81f
- >= 1c668ea65506e67ce2eae07b69bb09fcdd86e309, < faecdd423c27f0d6090156a435ba9dbbac0eaddb
Fixed in 37318d1a27c9cc5a70d3cd7e49e30ec86f2b8ca1, 7f0f0926f3010b10cff5e93446258f971e42f2fd, 6fdad20b7975bdc32e85b45f8f7c640f6687b81f, faecdd423c27f0d6090156a435ba9dbbac0eaddb
- 6.12
Fixed in 0, 6.12.86, 6.18.27, 7.0.4, 7.1
Mitigation
Upgrade Linux to 37318d1a27c9cc5a70d3cd7e49e30ec86f2b8ca1 or 7f0f0926f3010b10cff5e93446258f971e42f2fd or 6fdad20b7975bdc32e85b45f8f7c640f6687b81f or faecdd423c27f0d6090156a435ba9dbbac0eaddb or later.
Upgrade Linux to 0 or 6.12.86 or 6.18.27 or 7.0.4 or 7.1 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.