← All News · #linux

Linus Torvalds removes unsafe __get_user() and __put_user() functions in Linux 7.4

Linus Torvalds has removed the long-standing and unsafe `__get_user()` and `__put_user()` functions from the Linux 7.4 kernel. This change aims to improve the security and modernity of the kernel codebase.

Summary: Linus Torvalds has removed the long-standing and unsafe __get_user() and __put_user() functions from the Linux 7.4 kernel. This change aims to improve the security and modernity of the kernel codebase.

Functions like __get_user() and __put_user(), used for data transfer between user space and kernel space in the Linux kernel, have been removed by Linus Torvalds due to security risks. When misused, such functions can lead to memory corruption or privilege escalation vulnerabilities.

These functions directly performed data read and write operations from user space addresses. In modern kernel development practices, safer and more controlled APIs like copy_from_user() and copy_to_user() are preferred over such direct accesses. These APIs better control memory boundaries and access permissions.

This change is significant for engineers developing kernel modules or writing applications that operate at the kernel level. Existing code that uses the old and unsafe APIs will need to be updated. This enhances the overall security and stability of the kernel codebase.

Kernel developers should consider such API changes when migrating to newer kernel versions and adapt their code accordingly. Using secure APIs is a fundamental step for the overall resilience of the system.


🔗 Source: Phoronix Hardware
📡 Authoritative feeds & live tracking: Radar