| 1 |
Description: Fix RADIUS Packet Authentication use-after-free |
| 2 |
The BLASTRadius vulnerability mitigation introduced a use-after-free |
| 3 |
in the RadiusPacket::authenticateReceivedPacket method. |
| 4 |
This fix prevents use-after-free by assigning the string to a |
| 5 |
variable before relying on the c_str result. |
| 6 |
Author: Martin Rampersad <[email protected]> |
| 7 |
Last-Update: 2025-10-20 |
| 8 |
--- |
| 9 |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
| 10 |
--- a/RadiusClass/RadiusPacket.cpp |
| 11 |
+++ b/RadiusClass/RadiusPacket.cpp |
| 12 |
@@ -706,7 +706,8 @@ |
| 13 |
|
| 14 |
int RadiusPacket::authenticateReceivedPacket(RadiusServer *server) |
| 15 |
{ |
| 16 |
- const char *secret = server->getSharedSecret().c_str(); |
| 17 |
+ string secretString = server->getSharedSecret(); |
| 18 |
+ const char *secret = secretString.c_str(); |
| 19 |
gcry_md_hd_t context; |
| 20 |
int res; |
| 21 |
|