[PR #238] fix: use RejectAfterTime for failed-handshake cleanup #251

Open
opened 2026-10-13 21:07:59 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/238
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open

Base: master ← Head: fix/zero-key-cleanup-reject-after-time


📝 Commits (1)

  • 54de74b fix: use RejectAfterTime for failed-handshake cleanup

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/timers.c (+2 -2)

📄 Description

Summary

Use RejectAfterTime rather than RekeyAfterTime when scheduling
zero-key-material cleanup after handshake retries are exhausted.

The zero-key timer is documented and otherwise scheduled from
RejectAfterTime. This path was the outlier: it selected a value from
rekey_after_time but fell back to the fixed REJECT_AFTER_TIME constant,
so configurations with different rekey and reject ranges could clear residual
key material far earlier or later than intended.

The change keeps the existing kernel range-selection behavior and only corrects
which configured timer range is used.

Scope

This PR addresses only problem 2 from #227.

The data-path key expiration checks and receive-side negative refresh timeout
are intentionally left for separate changes.

Related to #227


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/238 **Author:** [@HeisLuka](https://github.com/HeisLuka) **Created:** 9/14/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/zero-key-cleanup-reject-after-time` --- ### 📝 Commits (1) - [`54de74b`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/54de74b3067a18fed9750a080c7658ec7200d3f1) fix: use RejectAfterTime for failed-handshake cleanup ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/timers.c` (+2 -2) </details> ### 📄 Description ## Summary Use `RejectAfterTime` rather than `RekeyAfterTime` when scheduling zero-key-material cleanup after handshake retries are exhausted. The zero-key timer is documented and otherwise scheduled from `RejectAfterTime`. This path was the outlier: it selected a value from `rekey_after_time` but fell back to the fixed `REJECT_AFTER_TIME` constant, so configurations with different rekey and reject ranges could clear residual key material far earlier or later than intended. The change keeps the existing kernel range-selection behavior and only corrects which configured timer range is used. ## Scope This PR addresses only problem 2 from #227. The data-path key expiration checks and receive-side negative refresh timeout are intentionally left for separate changes. Related to #227 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#251
No description provided.