device property: initialize the remaining fields of fwnode_handle in fwnode_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 01bb86b380a306bd937c96da36f66429f3362137 · < c81e2af41de6a159837c7129a4fc444ac6e48046| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
device property: initialize the remaining fields of fwnode_handle in fwnode_init()
If a firmware node is allocated on the stack (for instance: temporary software node whose life-time we control) or on the heap - but using a non-zeroing allocation function - and initialized using fwnode_init(), its secondary pointer will contain uninitialized memory which likely will be neither NULL nor IS_ERR() and so may end up being dereferenced (for example: in dev_to_swnode()). Set fwnode->secondary to NULL on initialization. While at it: initialize the remaining fields of struct fwnode_handle too just to be sure.
[ Fix typo in commit message. - Danilo ]
From the CVE record · Linux
The Linux kernel’s fwnode_init() leaves fields of a firmware node uninitialized, including its secondary pointer. If a node is allocated on the stack or with a non-zeroing heap allocation, that pointer may be dereferenced. The input does not specify an attack path, authentication requirements, or user interaction.
Engineers running Linux kernels that use fwnode_init() should check their vendor’s affected-version information; no versions are specified here.