A vulnerability in the NetUSB kernel module could allow remote attackers to execute code on millions of router devices, endpoint security company SentinelOne warns.
Developed by KCodes, NetUSB was designed to enable the interaction between remote network devices in a network and USB devices that are connected to a router. A driver needs to be installed on the remote PC to enable the functionality.
The code is employed by devices from numerous vendors, including Netgear, TP-Link, Tenda, EDiMAX, D-Link, and Western Digital.
Tracked as CVE-2021-45608, the security error exists in code that takes a command number and then routes the message to the respective SoftwareBus function, SentinelLabs, the threat intelligence and malware analysis unit of SentinelOne, explains.
What the researchers discovered was that buffer size supplied to code fetched from the remote PC isn’t validated, which results in an integer overflow, and then the allocated region is used and written to.
However, in the final call to the same function, “the supplied size is used as a maximum value to read from the remote socket,” but the normal size value (not the overflown value) is used here.
SentinelLabs also points out that – because of restrictions such as the maximum size that can be allocated, the amount of control an attacker has over the overflow itself, and the target structures that could be overwritten – developing an exploit for this vulnerability is not that easy.
The issue was reported to the NetUSB kernel module developers in September and a patch was sent to all vendors using the vulnerable code in October. Firmware updates that address the vulnerability in supported devices started rolling out in December.
“Since this vulnerability is within a third party component licensed to various router vendors, the only way to fix this is to update the firmware of your router, if an update is available. It is important to check that your router is not an end-of-life model as it is unlikely to receive an update for this vulnerability,” SentinelLabs notes.
Related: Netgear Patches Remote Code Execution Flaw in SOHO Routers
Related: InHand Router Flaws Could Expose Many Industrial Companies to Remote Attacks
Related: Critical, Exploitable Flaws in NETGEAR Router Firmware