CVE-2026-54634: Hamlib: rigctld `send_raw` Stack Out-of-Bounds Write and Uninitialized Memory Disclosure
Hamlib is a ham radio control library for radios, rotators, and amplifiers. Prior to 4.7.2, the unauthenticated rigctld sendraw command on TCP port 4532 reaches rigctlsendraw() in tests/rigctlparse.c, which writes a NUL byte at buf[buflen + 1] outside its 200-byte stack buffer, and rigsendraw() in src/rig.c, which copies replylen - 1 bytes instead of the actual nbytes received. A remote client can send the CR terminator with a short payload to trigger both flaws in one command under the default no-password configuration. The out-of-bounds write can crash the daemon or corrupt adjacent stack memory, while the oversized copy can return up to 198 bytes of uninitialized stack data to the client. This issue is fixed in version 4.7.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
hamlib/rigctldto a version that resolves this vulnerability.Fixed in 4.7.2
Event History
Frequently Asked Questions
Which deployments are exposed?
rigctld instances prior to 4.7.2 that are reachable over TCP port 4532 are exposed. The vulnerable send_raw command is unauthenticated under the default no-password configuration.
What does an attacker need to exploit this issue?
An attacker only needs network access to the rigctld service on TCP port 4532; no credentials or user interaction are required. A short send_raw payload terminated with CR can trigger both flaws in one command.
What can exploitation do?
The out-of-bounds stack write can crash rigctld or corrupt adjacent stack memory. The incorrect reply copy can disclose up to 198 bytes of uninitialized stack data to the remote client.
What should be done if an immediate upgrade is not possible?
Restrict network access to rigctld on TCP port 4532 so untrusted remote clients cannot connect, since exploitation requires network access to the service. The fixed version is 4.7.2.