hyper-rustls 0.25 pin transitively forces rustls-webpki 0.102.x, which has unpatchable advisories (incl. one high)

Đang mở
#2,266 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 11 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
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
databases, security

Hướng nghiên cứu

Bắt đầu từ libsql/Cargo.toml, tại phần phụ thuộc hyper, và lần theo HTTP client từ xa/đồng bộ hóa cũng như tls feature mặc định. So sánh ba hướng được đề xuất: migration sang hyper 1.x, một rustls 0.23 connector trực tiếp, hoặc làm cho tls trở thành opt-in. Công việc được xem là hoàn tất khi dependency rustls-webpki không thể phân giải đã được loại bỏ hoặc tránh sử dụng, và ảnh hưởng đến tính tương thích của các default feature đã được ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

libsql's tls feature (which is on by default) pins hyper-rustls = "0.25". That version line only ever depended on rustls 0.22, which in turn requires rustls-webpki ^0.102. Because 0.102.8 is the last release in the 0.102 line, and the relevant fixes only landed in 0.103.10 / 0.103.12 / 0.103.13, every downstream consumer of libsql inherits four rustls-webpki advisories with no reachable fix.

The chain

libsql 0.9.30 (tls, default)
  -> hyper-rustls 0.25.0   (only 0.25.x release)
    -> rustls 0.22.4       (last 0.22.x release)
      -> rustls-webpki ^0.102 -> 0.102.8   (last 0.102.x release)

Every link is already at its ceiling, so no cargo update can resolve this.

Advisories inherited

Advisory Severity Fixed in
GHSA-82j2-j2ch-gfr8 — DoS via panic on malformed CRL BIT STRING high (CVSS 7.5) 0.103.13
GHSA-pwjx-qhcg-rvj4 — CRLs not authoritative by Distribution Point medium 0.103.10
GHSA-965h-392x-2mh5 — URI name constraints incorrectly accepted low 0.103.12
GHSA-xgp8-3hg3-c2mh — name constraints accepted for wildcard certs low 0.103.12

To be clear about impact: we assessed the two CRL ones as not reachable through libsql, since rustls only parses CRLs when they're explicitly supplied via with_crls(), and neither libsql nor hyper-rustls 0.25 ever does. So this is primarily a dependency-hygiene / compliance problem rather than an exploitable one — but it still surfaces as an unresolvable high-severity Dependabot alert in every downstream repo, which is painful for anyone under SOC2-style "no open highs" policies. We ended up having to dismiss them with written justification.

Why it isn't a one-line bump

hyper-rustls moved to rustls 0.23 (and thus webpki 0.103) in 0.26, but 0.26+ also requires hyper 1.x. libsql is still on hyper = "0.14":

https://github.com/tursodatabase/libsql/blob/main/libsql/Cargo.toml#L20-L21

So closing this properly means a hyper 0.14 → 1.x migration for the remote/sync HTTP client. Confirmed still present on main, and on 0.10.0-pre.4.

Possible options, roughly in order of effort

  1. Migrate to hyper 1.x + hyper-rustls 0.27. The real fix; also unblocks a lot of other modernization.
  2. Swap the TLS stack for rustls 0.23 directly behind libsql's own connector, decoupling from hyper-rustls' hyper requirement.
  3. Interim mitigation — drop tls from default. Consumers that only use local databases (Builder::new_local) currently pull the whole rustls 0.22 stack for nothing. Notably tls is already independent: remote, sync, and replication do not depend on it, so making it opt-in would be a small change that lets local-only users escape these advisories entirely. It is technically a breaking change for anyone relying on defaults for remote TLS, so it'd want a minor-version note.

Happy to put up a PR for (3) if that's a direction you'd accept — it's the one that would unblock downstream consumers soonest. (1) looks like it needs a maintainer to scope.

Environment

  • libsql 0.9.30 (also verified against main and 0.10.0-pre.4)
  • Discovered via Dependabot on a downstream Rust project that uses libsql only through Builder::new_local
Ngôn ngữ chính
C
Star
17.3k
Fork
562
Merge trung bình
10 ngày 15 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tursodatabase/libsql

Tất cả issue của tursodatabase/libsql

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.