Executive brief
The PCF8563 real-time clock driver in the Linux kernel has a memory leak that occurs when the device is unbound or the module is reloaded. Each bind/unbind cycle leaks kernel memory structures and file system node references, which can accumulate over time and consume system resources without ever being freed.
Technical details
The PCF8563 RTC driver registers a CLKOUT clock provider using of_clk_add_provider() but lacks a corresponding of_clk_del_provider() call or remove callback to clean it up on device unbind. Each registration allocates a struct of_clk_provider, increments an OF node reference count, and adds an entry to a global list—none of which is released. While the clock itself is device-managed via devm_clk_register(), the provider registration was not. The fix replaces of_clk_add_provider() with devm_of_clk_add_hw_provider() to ensure automatic cleanup on unbind. No user interaction or special privileges are required to trigger the leak; it occurs passively during normal device binding operations.
Affected products
- Linux Linux kernel multiple versions (fix available in stable branches)
Timeline
- 2026-09-17: disclosed
- 2026-09-14: patched: Fix committed to stable kernel trees