Injection vulnerability in ExIRC.Client.msg() / IRC standard nonconformance
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- elixir
- Lĩnh vực
- networking, security
Hướng nghiên cứu
Bắt đầu từ phần triển khai và các bài kiểm thử cho ExIRC.Client.msg(), được issue xác định là điểm vào dễ bị tấn công. Xác định cách các tin nhắn chứa ký tự xuống dòng được xử lý, sau đó xác minh rằng msg() từ chối chúng và hành vi được đề xuất của msg_multiline() gửi một tin nhắn IRC cho mỗi dòng. Issue không nêu tên các tệp hoặc bài kiểm thử cụ thể.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'll present this as a little story:
Suppose we are implementing a bot that reads the titles from Web pages and posts them on IRC, a classic.
As a short introduction (only vaguely related to the bug), further suppose that we are using Floki (which is also not standards conformant) to parse the title of say, this webpage:
<!DOCTYPE html>
<html><head><title>I don't want to
quit programming!</title></head><body>
…</body></html>
(this is conformant HTML, even though the formatting isn't pretty!)
Assume the result gets into title = "I don't want to\nquit programming!"… and we get to the ExIRC bug:
ExIRC.Client.msg(state.client, :privmsg, dest, "Title: #{title}")
In the IRC channel we see:
<someone> https://domain.tld/blog/i-dont-want-to-quit-programming
<potionbot> Title: I don't want to
*potionbot has quit ("programming!")
Oops.
Obvious solutions:
- Panicking: cut off all text after the first newline to prevent the injection.
- Vengeful: throw an error if there is a newline in the message (this is not legal in the IRC standard anyway).
- Posed: make the type of the fourth argument of
ExIRC.Client.msg()aStringWithoutNewlinestype, preventing the error at compile time. - Creative: post several messages in IRC, one per line.
My preference goes to the last two, and specifically both of them at once:
- Make
ExIRC.Client.msg()refuse newlines, preventing the application from starting if that's not guarded against, and - Introduce a new
ExIRC.Client.msg_multiline()method that posts several messages to accomodate for the line feeds.
For more ideas, see https://eiv.dev
- Ngôn ngữ chính
- Elixir
- Star
- 154
- Fork
- 38
- 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
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 bitwalker/exirc
-
Fork available: exirc-nextĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
IRCv3 Extensions HandlingĐang mởenhancement question
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Custom Command HandlingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của bitwalker/exirc
Issue tương tự
-
Heavy legs 1.12–1.17: compiler corpus goldens not regenerated for #4770Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
intellij-elixir/intellij-elixir#4782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
hexlet-codebattle/codebattle#2376 ·
-
level 2 wocs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
phravins/QuantumBilling#51 ·
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtimeCó thể đã có người làm @Goldziher đã nhận hôm nay. Đang mở
Độ 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 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carverauto/serviceradar#6898 ·
Maintainer thường phản hồi trong vòng 1 ngày