You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CIBIR.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## What is it
4
4
5
-
See [XDP](./XDP.md) first to understand the context.
5
+
See the [draft IETF](https://datatracker.ietf.org/doc/html/draft-banks-quic-cibir) for CIBIR.
6
6
7
-
When CIBIR is used, rather than programming XDP to filter and demux packets based on on address and port number,
7
+
When CIBIR is used, rather than programming [XDP](./XDP.md) to filter and demux packets based on on address and port number,
8
8
XDP with CIBIR will instead filter and de-mux packets based on address, port number, and QUIC connection ID.
9
9
10
10
What CIBIR allows for is 2 or more separate server processes to share a single
@@ -17,10 +17,19 @@ port on the same machine, as long as their CIBIR ID is different.
17
17
- The responsbility of book-keeping shared ports and ensuring robust protection for those shared ports is delegated to the application.
18
18
19
19
20
-
## Port protection recommendation for shared ports
20
+
## Port protection recommendations for shared ports
21
+
22
+
### Option 1: Persistent port reservations (Recommended)
21
23
22
24
MsQuic strongly recommends applications leverage the Windows [persistent port reservations API](https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-createpersistentudpportreservation) to secure shared CIBIR ports prior to serving multi-process CIBIR traffic on a shared port.
23
25
- One time setup by a system admin to create the persistent reservation.
24
26
> A good option for book-keeping persistent port reservations is via registry keys.
25
-
- Persistent port reservations survive reboots, allowing for robust portection in the event of crashes.
26
-
- Having a persistent reservation makes sure critical ports are taken out of the ephemeral port pool, so an unsuspecting application process won't get accidently assigned an ephemeral port that collides with a CIBIR port.
27
+
- Persistent port reservations survive reboots, allowing for robust protection in the event of crashes.
28
+
- Having a persistent reservation makes sure CIBIR ports are taken out of the ephemeral port pool and forbids sockets from binding to it unless it is associated with a persistent reservation token, which can only happen in an elevated process.
29
+
- This way, an unsuspecting application process won't get accidently assigned an ephemeral port that collides with a CIBIR port.
30
+
31
+
### Option 2: WFP ALE (Application Layer Enforcement) filters
32
+
33
+
As an alternative, applications can use the [Windows Filtering Platform (WFP)](https://learn.microsoft.com/en-us/windows/win32/fwp/windows-filtering-platform-start-page) to create ALE filters that block unauthorized bind attempts to CIBIR ports.
34
+
35
+
ALE filters operate at the [bind and connect authorization layers](https://learn.microsoft.com/en-us/windows/win32/fwp/ale-layers) (`FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4/V6`, `FWPM_LAYER_ALE_RESOURCE_ASSIGNMENT_V4/V6`). A filter can be configured to block any process from binding to a specific UDP port unless it matches an allowed application path or security descriptor.
0 commit comments