CVE-2024-24416
📋 TL;DR
A buffer overflow vulnerability in Magma's decode_access_point_name_ie function allows attackers to cause denial of service via crafted NAS packets. This affects Magma cellular core network software users running vulnerable versions. The vulnerability is in 3GPP protocol handling code.
💻 Affected Systems
- Linux Foundation Magma
📦 What is this software?
Magma by Linuxfoundation
⚠️ Risk & Real-World Impact
Worst Case
Complete service disruption of Magma-based cellular networks, potentially affecting mobile connectivity for end users.
Likely Case
Service instability or crashes in Magma components handling NAS signaling, leading to temporary connectivity issues.
If Mitigated
Limited impact if network segmentation and packet filtering prevent malicious NAS packets from reaching vulnerable systems.
🎯 Exploit Status
Exploitation requires crafting valid NAS packets with malicious content. Attackers need access to cellular network interfaces.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.9 (commit 08472ba98b8321f802e95f5622fa90fec2dea486)
Vendor Advisory: https://cellularsecurity.org/ransacked
Restart Required: No
Instructions:
1. Update Magma to version 1.9 or later. 2. Apply commit 08472ba98b8321f802e95f5622fa90fec2dea486 if using custom builds. 3. Verify the fix by checking the updated 3gpp_24.008_sm_ies.c file.
🔧 Temporary Workarounds
Network Segmentation
allIsolate Magma components from untrusted network segments and implement strict firewall rules for NAS protocol traffic.
Packet Filtering
allImplement network-level filtering for suspicious NAS packets using IDS/IPS systems with custom rules for Magma traffic.
🧯 If You Can't Patch
- Implement strict network access controls to limit NAS packet sources to trusted cellular network elements only.
- Deploy intrusion detection systems to monitor for anomalous NAS packet patterns and potential exploitation attempts.
🔍 How to Verify
Check if Vulnerable:
Check Magma version: magma version | grep -i version. If version <= 1.8.0, system is vulnerable.
Check Version:
magma version
Verify Fix Applied:
Verify Magma version is >= 1.9 or check for commit 08472ba98b8321f802e95f5622fa90fec2dea486 in git log.
📡 Detection & Monitoring
Log Indicators:
- Magma process crashes or restarts
- Error messages related to decode_access_point_name_ie
- Memory corruption warnings in system logs
Network Indicators:
- Unusual NAS packet patterns
- NAS packets with abnormally large access point name fields
- Traffic from unexpected sources to Magma NAS interfaces
SIEM Query:
source="magma" AND ("crash" OR "segmentation fault" OR "buffer overflow")