In the Linux kernel, the following vulnerability has been resolved:
memory: pl353-smc: Fix refcount leak bug in pl353_smc_probe()
The break of for_each_available_child_of_node() needs a corresponding of_node_put() when the reference 'child' is not used anymore. Here we do not need to call of_node_put() in fail path as '!match' means no break.
While the of_platform_device_create() will created a new reference by 'child' but it has considered the refcounting.
| Software | From | Fixed in |
|---|---|---|
| linux / linux_kernel | 5.0 | 5.4.220 |
| linux / linux_kernel | 5.5 | 5.10.150 |
| linux / linux_kernel | 5.11 | 5.15.75 |
| linux / linux_kernel | 5.16 | 5.19.17 |
| linux / linux_kernel | 6.0 | 6.0.3 |