SBN-Client Stack Buffer Overflow — recv_msg() and ingest_app_message()
The SBN-Client used a 16-bit message size field from the network as a byte count without validation, so a remote attacker could overflow a 32,768-byte stack buffer by sending a maximum size value. Both recv_msg() and ingest_app_message() were affected, allowing a remote attacker to overflow the stack.
- Accepted in 30 days
- Fixed in 38 days
- Disclosed after 43 days
Summary by Excal1bur
Stack-based buffer overflow (CWE-121, CVSS 9.8) in NASA SBN-Client recv_msg() and ingest_app_message(). The 16-bit MsgSz field received from the network was used directly as a byte count without validation, allowing a remote attacker to overflow a 32,768-byte stack buffer by sending MsgSz=0xFFFF (overflow of 32,767 bytes). Both functions were affected: sbn_client.c and sbn_client_ingest.c. Fixed in PR #12.
Reported by Daniel Miranda Barcelona (Excal1bur).
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 16-bit MsgSz field from the network was used directly as a byte count without validation against the 32,768-byte stack buffer.
Impact
A remote attacker could overflow a 32,768-byte stack buffer by up to 32,767 bytes, which could lead to code execution or a crash.
What the attacker needed
Network access to the SBN client
The fix
The issue was fixed in PR #12.
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 program that receives messages over the network must check how long each message claims to be before copying it into a fixed-size space in memory. Here it trusted the claimed length, so a very large claim caused data to spill past the space and overwrite nearby memory. That kind of spill is called a buffer overflow and can let an attacker crash the program or run their own code.
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.