Commit 300d1a3
committed
Fix agent handling of 403 registration responses
The agent was incorrectly interpreting 403 Forbidden responses from
the registrar as API version incompatibility errors. This caused two
problems:
1. The agent would try all enabled API versions, even though 403
indicates a permanent security rejection (e.g., TPM identity
mismatch during re-registration)
2. The agent would continue running after registration failure,
making it appear operational when it was not properly registered
This issue became apparent with the Python keylime registrar security
fix for CVE-2025-13609 (duplicate UUID vulnerability), which returns
403 Forbidden when an agent attempts to re-register with a different
TPM identity. The Rust agent would misinterpret this as:
"IncompatibleAPI: agent enabled versions = '[2.1, 2.2]',
registrar supported versions = '[1.0, 2.0, 2.1, 2.2, 2.3, 2.4, 3.0]'"
The agent will now correctly fail fast when the registrar rejects
registration for security reasons, allowing proper error detection
in tests and production deployments.
Related: keylime/keylime#1820 (Python registrar UUID spoofing fix)
Signed-off-by: Sergio Arroutbi <[email protected]>1 parent a7cafe7 commit 300d1a3
2 files changed
+39
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
| |||
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
390 | 404 | | |
391 | 405 | | |
392 | 406 | | |
| |||
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
441 | 464 | | |
442 | 465 | | |
443 | 466 | | |
| |||
458 | 481 | | |
459 | 482 | | |
460 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
461 | 495 | | |
462 | 496 | | |
463 | 497 | | |
| |||
0 commit comments