fix(cable): close hybrid transport spec gaps in tunnel and L2CAP
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- networking, security, testing-qa
Hướng nghiên cứu
Bắt đầu với transport/cable/tunnel.rs và connection_stages.rs, sau đó kiểm tra transport/error.rs và CableKnownDeviceInfoStore::delete_known_device để xử lý trạng thái kết nối. Đọc channel.rs, protocol.rs và l2cap.rs, đồng thời chạy test hiện có split_handles_binary_payload trước khi thay đổi hành vi framing hoặc shutdown. Công việc được xem là hoàn tất khi bốn trường hợp transport và framing được liệt kê đều được bao phủ, bao gồm một regression test cho CRLF nội bộ, và yêu cầu làm rõ đặc tả cần thiết đã được nêu ra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The hybrid (caBLE) transport in transport/cable handles the common QR-initiated flow, but four behaviours required by the CTAP hybrid / caBLE v2 spec are missing or broken, across tunnel connect handling and L2CAP framing.
Why it matters
These break interop with real authenticators and platforms. Redirecting tunnel servers are unreachable, dead linking records are retried forever, clean shutdown and late linking updates are lost, and some direct-BLE messages get corrupted.
What to do
1. Follow HTTP redirects on tunnel connect
tunnel::connect() (libwebauthn/src/transport/cable/tunnel.rs) calls tokio_tungstenite::connect_async(), which doesn't follow redirects, so any 3xx becomes ConnectionFailed. The spec requires following them.
- Follow 3xx redirects (e.g. 307/308) to the
Locationtarget before the WebSocket upgrade, with a redirect cap. - Re-attach
Sec-WebSocket-Protocol: fido.cable, andX-caBLE-Client-Payloadfor known-device connections, on the redirected request.
2. Handle HTTP 410 Gone on state-assisted contact
connect() collapses every non-101 status into ConnectionFailed. For CableTunnelConnectionType::KnownDevice (/cable/contact/{contact_id}), a 410 means the linking record is permanently gone, but nothing deletes it, so the dead link is retried forever.
- Surface 410 distinctly. No
TransportErrorvariant exists yet (transport/error.rs). - On 410, delete the record via
CableKnownDeviceInfoStore::delete_known_deviceand stop retrying.connect_data_channel()inconnection_stages.rsneeds store access (today it is only in the post-handshakeconnection()path).
3. Send Shutdown on close and linger for late linking data
CableChannel::close() (channel.rs) is an empty TODO and Drop just aborts. We handle inbound CableTunnelMessageType::Shutdown (protocol.rs, RecvOutcome::PeerShutdown) but never send one, and tearing down right after the CTAP response drops any post-transaction Update linking message.
- On
close(), send aShutdownframe over the encrypted channel before dropping it. - After the CTAP response, linger briefly (~2 minutes) to capture late
Updatelinking data.
4. Fix ambiguous CRLF framing over L2CAP
l2cap.rs ends each message with EOM = [0x0D, 0x0A] and split_next_message() splits at the first CRLF, but binary Noise/AES-GCM payloads can contain 0x0D 0x0A. For a 700-1400 byte ciphertext that is a ~1-2% chance of an internal CRLF corrupting the frame. The split_handles_binary_payload test only covers payloads with no internal CRLF.
- Make L2CAP message boundaries unambiguous for arbitrary binary payloads.
- Add a regression test for a payload containing an internal
0x0D 0x0A. - Raise the framing ambiguity with the CTAP hybrid spec editors. Delimiter framing without escaping or a length prefix is unsafe and likely needs a spec clarification.
- Ngôn ngữ chính
- Rust
- Star
- 602
- Fork
- 33
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linux-credentials/libwebauthn
-
Add event-based device discoveryĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
linux-credentials/libwebauthn#328 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
linux-credentials/libwebauthn#327 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
linux-credentials/libwebauthn#326 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
linux-credentials/libwebauthn#313 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
linux-credentials/libwebauthn#195 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của linux-credentials/libwebauthn
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
pbakaus/impeccable#1620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
swc-project/swc-next-issues#533 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
nautechsystems/nautilus_trader#5718 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`luvus --remote` cannot start on a host whose login shell is NushellCó thể đã có người làm @schlich đã nhận hôm nay. Đang mởstatus: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày