Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

RUSTSEC-2026-0172: Possible use after free when deserializing a SQLite database via `SqliteConnection::deserialize_readonly_database`

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/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, sqlite
Lĩnh vực
backend, databases, security

Hướng nghiên cứu

Issue không nêu tên tệp graph-node hay bài kiểm thử nào. Hãy bắt đầu bằng cách kiểm tra các khai báo dependency của repository đối với Diesel 2.3.9 và xem chức năng SQLite có được sử dụng hay không; được xem là hoàn tất khi Diesel được cập nhật lên 2.3.10 hoặc mới hơn và các bước kiểm tra hiện có liên quan được chạy.

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

Mô tả

Possible use after free when deserializing a SQLite database via SqliteConnection::deserialize_readonly_database

Details
Status unsound
Package diesel
Version 2.3.9
URL https://github.com/diesel-rs/diesel/commit/1bc2ea46d9840e8d9af844239d3c84f37fe7d84b
Date 2026-06-05

Diesel allows loading a SQLite database from a byte buffer, represented as &[u8], at runtime via the SqliteConnection::deserialize_readonly_database function. In previous versions of Diesel, this buffer was passed directly to libsqlite3. Since libsqlite3 requires the buffer to remain alive for as long as the database connection is open and Diesel did not ensure this as part of its safe API, callers of SqliteConnection::deserialize_readonly_database could drop the buffer prematurely. This prematurely drop caused libsqlite3 to operate on freed memory.

This vulnerability affects users of SqliteConnection::deserialize_readonly_database who drop the buffer passed to the function before they drop the database connection.

Mitigation

The preferred mitigation to the outlined problem is to update to Diesel version 2.3.10 or newer, which includes a fix for the problem. Alternatively users need to take to keep the buffer alive until the connection is dropped.

Resolution

Diesel now stores a copy of the buffer inside of the SqliteConnection object itself to keep it alive as long as the underlying libsqlite3 connection exists.

See advisory page for additional details.

Ngôn ngữ chính
Rust
Star
3.2k
Fork
1.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 graphprotocol/graph-node

Tất cả issue của graphprotocol/graph-node

Issue tương tự

Thêm issue về Rust

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.