of/overlay: put property on deadprops only after changeset add succeeds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f96278810150fc39085d1872e5b39ea06366d03e · < 7dc6a769153c0457077a0da4888a00f61e66de15| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
of/overlay: put property on deadprops only after changeset add succeeds
add_changeset_property() links a new property of a not-yet-live target node into the node's deadprops list before handing it to of_changeset_add_property(). If that fails, the error path frees the property but leaves the freed pointer linked in deadprops, and of_node_release() frees it a second time when the aborted overlay's node is released.
Record the changeset entry first and link the property into deadprops only on success. of_changeset_add_property() never looks at the node's property lists, so the order of the two steps is otherwise immaterial, and the error path frees a property that nothing references.
From the CVE record · Linux
The Linux kernel's device tree overlay code can leave a freed property linked in a node's deadprops list if adding the property to a changeset fails. Releasing the aborted overlay's node then frees the property a second time. The input does not specify how an attacker could trigger this failure or whether authentication or user interaction is required.
Engineers running Linux kernels with device tree overlay support should check their versions against the vendor advisory; affected versions are not specified.