Skip to content
Memory corruption Advisory Advanced CVE-2021-32458

Trend Micro Inc. Home Network Security tdts.ko chrdev_ioctl_handle privilege escalation vulnerability

A kernel driver in Trend Micro Home Network Security fails to validate the length field in an ioctl request, copying up to 0x3FFF bytes into a smaller stack buffer. An attacker with local access can trigger a stack-based buffer overflow and potentially execute code in kernel context.

Carl Hurd Follow

Originally disclosed on Cisco Talos

High 7.8 View original

A privilege escalation vulnerability exists in the tdts.ko chrdevioctlhandle functionality of Trend Micro, Inc. Home Network Security 6.1.567.

Carl Hurd and Kelly Leuschner, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The driver extracts a length from the ioctl request and passes it directly to __copy_from_user without validating it against the size of the destination stack buffer.

Impact

An attacker with local access could cause a kernel crash or potentially execute arbitrary code with kernel privileges, as demonstrated by the controlled program counter in the crash log.

What the attacker needed

Local access to the device; ability to issue ioctl calls

The fix

The driver should validate the user-supplied length against the size of the stack buffer before calling __copy_from_user; the text states the vendor patched it.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A device driver in the home router accepts commands from programs running on the device. It trusts a size value supplied by the program without checking it, so a malicious program can send a very large command that overflows a small memory area in the kernel. This can crash the device or let the attacker run their own code with high privileges.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Carl Hurd

View all

2 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.