CVE-2024-36016: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: tty: n_gsm: fix possible out-of-bounds in gsm0_receive() Assuming the following: - side A configures the n_gsm in basic option mode - side B sends the header of a basic option mode frame with data length 1 - side A switches to advanced option mode - side B sends 2 data bytes which exceeds gsm->len Reason: gsm->len is not used in advanced option mode. - side A switches to basic option mode - side B keeps sending until gsm0_receive() writes past gsm->buf Reason: Neither gsm->state nor gsm->len have been reset after reconfiguration. Fix this by changing gsm->count to gsm->len comparison from equal to less than. Also add upper limit checks against the constant MAX_MRU in gsm0_receive() and gsm1_receive() to harden against memory corruption of gsm->len and gsm->mru. All other checks remain as we still need to limit the data according to the user configuration and actual payload size.
AI Analysis
Technical Summary
CVE-2024-36016 is a high-severity vulnerability in the Linux kernel's GSM (Generic Stream Module) tty driver, specifically within the gsm0_receive() function. The vulnerability arises due to improper handling of buffer boundaries when switching between basic and advanced option modes in the n_gsm module. The issue occurs because the gsm->len field, which tracks data length, is not properly reset or validated during mode transitions. An attacker controlling the data sent to the vulnerable system can exploit this by sending frames with data lengths that exceed the allocated buffer size, causing gsm0_receive() to write beyond the bounds of gsm->buf. This out-of-bounds write can lead to memory corruption, potentially allowing an attacker to cause denial of service (kernel crash) or escalate privileges by corrupting kernel memory structures. The fix involves changing the comparison from equality to less-than between gsm->count and gsm->len, and adding upper limit checks against a constant MAX_MRU to prevent memory corruption of gsm->len and gsm->mru. These changes harden the function against malformed input and ensure proper bounds checking. The vulnerability is classified under CWE-125 (Out-of-bounds Read/Write) and has a CVSS v3.1 score of 7.7, indicating high severity. Exploitation requires local access (AV:L), low attack complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N). The impact affects confidentiality and availability, with no direct integrity impact noted. No known exploits are currently reported in the wild.
Potential Impact
For European organizations, this vulnerability poses a significant risk especially to those running Linux-based systems with the affected kernel versions, including servers, embedded devices, and network infrastructure. The out-of-bounds write can lead to kernel crashes causing denial of service, which can disrupt critical services and operations. More critically, memory corruption in the kernel space could be leveraged by attackers to escalate privileges, potentially gaining root access and full control over affected systems. This could lead to data breaches, unauthorized access to sensitive information, and disruption of business continuity. Organizations in sectors such as finance, healthcare, telecommunications, and government, which heavily rely on Linux infrastructure, could face operational and reputational damage. Given the local attack vector, the threat is more relevant to environments where untrusted users have local access or where attackers can execute code locally, such as multi-user systems, shared hosting, or compromised endpoints. The lack of user interaction requirement increases the risk of automated exploitation once local access is achieved.
Mitigation Recommendations
European organizations should prioritize patching affected Linux kernel versions as soon as updates become available from their distribution vendors. Since the vulnerability involves kernel-level code, applying official kernel security patches is the most effective mitigation. In environments where immediate patching is not feasible, organizations should restrict local access to trusted users only, enforce strict access controls, and monitor for unusual kernel crashes or system instability that could indicate exploitation attempts. Employing kernel integrity monitoring and leveraging security modules like SELinux or AppArmor can help limit the impact of potential exploits. Additionally, organizations should audit and harden configurations related to the n_gsm module, disabling it if not required. Network segmentation and endpoint security controls can reduce the risk of attackers gaining local access. Finally, maintain up-to-date intrusion detection and prevention systems capable of detecting anomalous behavior indicative of exploitation attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Belgium, Finland
CVE-2024-36016: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: tty: n_gsm: fix possible out-of-bounds in gsm0_receive() Assuming the following: - side A configures the n_gsm in basic option mode - side B sends the header of a basic option mode frame with data length 1 - side A switches to advanced option mode - side B sends 2 data bytes which exceeds gsm->len Reason: gsm->len is not used in advanced option mode. - side A switches to basic option mode - side B keeps sending until gsm0_receive() writes past gsm->buf Reason: Neither gsm->state nor gsm->len have been reset after reconfiguration. Fix this by changing gsm->count to gsm->len comparison from equal to less than. Also add upper limit checks against the constant MAX_MRU in gsm0_receive() and gsm1_receive() to harden against memory corruption of gsm->len and gsm->mru. All other checks remain as we still need to limit the data according to the user configuration and actual payload size.
AI-Powered Analysis
Technical Analysis
CVE-2024-36016 is a high-severity vulnerability in the Linux kernel's GSM (Generic Stream Module) tty driver, specifically within the gsm0_receive() function. The vulnerability arises due to improper handling of buffer boundaries when switching between basic and advanced option modes in the n_gsm module. The issue occurs because the gsm->len field, which tracks data length, is not properly reset or validated during mode transitions. An attacker controlling the data sent to the vulnerable system can exploit this by sending frames with data lengths that exceed the allocated buffer size, causing gsm0_receive() to write beyond the bounds of gsm->buf. This out-of-bounds write can lead to memory corruption, potentially allowing an attacker to cause denial of service (kernel crash) or escalate privileges by corrupting kernel memory structures. The fix involves changing the comparison from equality to less-than between gsm->count and gsm->len, and adding upper limit checks against a constant MAX_MRU to prevent memory corruption of gsm->len and gsm->mru. These changes harden the function against malformed input and ensure proper bounds checking. The vulnerability is classified under CWE-125 (Out-of-bounds Read/Write) and has a CVSS v3.1 score of 7.7, indicating high severity. Exploitation requires local access (AV:L), low attack complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N). The impact affects confidentiality and availability, with no direct integrity impact noted. No known exploits are currently reported in the wild.
Potential Impact
For European organizations, this vulnerability poses a significant risk especially to those running Linux-based systems with the affected kernel versions, including servers, embedded devices, and network infrastructure. The out-of-bounds write can lead to kernel crashes causing denial of service, which can disrupt critical services and operations. More critically, memory corruption in the kernel space could be leveraged by attackers to escalate privileges, potentially gaining root access and full control over affected systems. This could lead to data breaches, unauthorized access to sensitive information, and disruption of business continuity. Organizations in sectors such as finance, healthcare, telecommunications, and government, which heavily rely on Linux infrastructure, could face operational and reputational damage. Given the local attack vector, the threat is more relevant to environments where untrusted users have local access or where attackers can execute code locally, such as multi-user systems, shared hosting, or compromised endpoints. The lack of user interaction requirement increases the risk of automated exploitation once local access is achieved.
Mitigation Recommendations
European organizations should prioritize patching affected Linux kernel versions as soon as updates become available from their distribution vendors. Since the vulnerability involves kernel-level code, applying official kernel security patches is the most effective mitigation. In environments where immediate patching is not feasible, organizations should restrict local access to trusted users only, enforce strict access controls, and monitor for unusual kernel crashes or system instability that could indicate exploitation attempts. Employing kernel integrity monitoring and leveraging security modules like SELinux or AppArmor can help limit the impact of potential exploits. Additionally, organizations should audit and harden configurations related to the n_gsm module, disabling it if not required. Network segmentation and endpoint security controls can reduce the risk of attackers gaining local access. Finally, maintain up-to-date intrusion detection and prevention systems capable of detecting anomalous behavior indicative of exploitation attempts.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-17T13:50:33.154Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d9828c4522896dcbe2496
Added to database: 5/21/2025, 9:08:56 AM
Last enriched: 7/3/2025, 12:27:23 AM
Last updated: 8/5/2025, 8:37:50 AM
Views: 12
Related Threats
CVE-2025-9053: SQL Injection in projectworlds Travel Management System
MediumCVE-2025-9052: SQL Injection in projectworlds Travel Management System
MediumPlex warns users to patch security vulnerability immediately
HighCVE-2025-9019: Heap-based Buffer Overflow in tcpreplay
LowCVE-2025-9017: Cross Site Scripting in PHPGurukul Zoo Management System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.