Devices with Qualcomm modems safe from critical ASN.1 telecom flaw
The vulnerability was discovered in ASN1C, a popular compiler that produces C code for parsing ASN.1 encoded data. Abstract Syntax Notation One (ASN.1) is a standard for representing, encoding, transmitting, and decoding data in telecommunications and computer networking.
Many devices, from mobile phones to switching equipment inside cellular infrastructure parse ASN.1 data and do so using programs that were created by compilers such as ASN1C, which is developed by U.S.-based Objective Systems.
Researchers from the Programa STIC at the Fundación Sadosky in Argentina found a security issue in ASN1C that causes the code generated by the compiler to be vulnerable to a heap overflow. The flaw could allow attackers to remotely execute rogue code inside the firmware of devices that use ASN1C code.
The CERT Coordination Center (CERT/CC) at Carnegie Mellon University published a security advisory about the flaw last week accompanied by a long list of vendors who have products that could potentially be affected. While the vulnerability status for most of those vendors was listed as "unknown," Qualcomm was originally listed as affected. The company has since been moved into the "not affected" category, along with Hewlett Packard Enterprise, Honeywell and Siemens.
The vulnerable ASN1C code was present in Qualcomm's cellular stack, but was not exploitable because of a separate ASN.1 data encoding rule, a Qualcomm representative said via email. In order to exploit the vulnerability, "an attacker needs to send a large value in a specially crafted network signaling message, but the encoding rule specified in the 3G/4G standards and in our products does not allow such a large value to get through."
Specifically, if a device with a Qualcomm modem receives a very large value in a signalling message, like the one required to exploit the flaw, the firmware will truncate that value. This means that attackers can't attack devices with Qualcomm 3G/4G modems.
It's not clear if this ASN.1 encoding rule and subsequent data truncation is enforced by devices from other vendors as well.
In theory the flaw can be used to attack both network-level equipment, which would likely require knowledge of the particular set-up of the targeted network, as well as end-user devices, which could be done through rogue base stations -- fake cell towers that trick phones to temporarily register with them.
Software systems that use ASN.1 parsing code generated with the ASN1C compiler for C/C++ version 7.0 or below could be affected, the Programa STIC researchers said. Objective Systems developed a patch that will be included in the compiler's upcoming 7.0.2 release. The company's customers can request a fixed interim version in the meantime.