[email protected]: empty pseudo class from format_timespan() causes heap over-read in St find_class_name() and crashes Cinnamon
Maintainer thường phản hồi trong vòng 8 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- desktop
Hướng nghiên cứu
Start with files/usr/share/cinnamon/applets/[email protected]/eventView.js and trace how format_timespan()'s pseudo class reaches update_variations(). Then inspect src/st/st-widget.c, especially find_class_name(), and the attached reproduction details. Confirm the fix prevents the crash for events starting 60 minutes or more later today while preserving their countdown text.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Distribution
NixOS 26.05
Package version
6.6.8
Graphics hardware in use
not relevant
Frequency
Only occasionally
Bug description
Cinnamon sometimes segfaults right after login, or when the calendar server updates events. Then the "fallback mode / restart Cinnamon?" dialog appears. It only happens when there are calendar events, and it happens at random.
Steps to reproduce
In Cinnamon (random, depends on heap layout):
- Have a calendar with an event today that starts 60 minutes or more from now, so it shows in the calendar applet.
- Log in, or wait for the calendar server to send an event update.
- Sometimes Cinnamon segfaults with the stack trace above.
Expected behavior
Cinnamon does not crash. An event that starts later today shows its countdown text ("In 2 hours", "Starting later today", …) without adding a pseudo class.
Additional information
Cause
format_timespan()infiles/usr/share/cinnamon/applets/[email protected]/eventView.jsreturns""as the pseudo class for events that start today 60 minutes or more from now (return ["", ...]).update_variations()passes it on unconditionally:countdown_labelis the last child oflabel_box.st_widget_last_child_notify()has already given it the pseudo classlast-child, soclass_listis not empty.- In
src/st/st-widget.c,find_class_name()loops withstrstr (match + 1, class_name). Withclass_name == "",strstrnever returns NULL. Forclass_list = "last-child"no position meets the conditions, so the loop steps past the terminating NUL and keeps reading heap memory. It stops either when some bytes happen to match (no crash, but a bogus "found" result) or when it reaches an unmapped page (segfault). This is why the crash is random.
- Ngôn ngữ chính
- JavaScript
- Star
- 5.7k
- Fork
- 941
- Merge trung bình
- 6 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 12
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 linuxmint/cinnamon
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 8 ngày
-
BUG
Độ 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 8 ngày
-
Sound applet: seek bar jumps back after seeking when player resends metadata (e.g. mpDris2/MPD)Đang mởBUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Menu applet omits descriptions from search-provider resultsCó thể đã có người làm @ah682 đã nhận 8 ngày trước. Đang mởBUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
linuxmint/cinnamon#14104 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
-
xapp-status applet: status icon labels are ellipsized to "..." when the panel zone is a fraction of a pixel shortCó thể làm lại được @Priyeshshrivastav đã nhận 14 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
linuxmint/cinnamon#14096 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
Tất cả issue của linuxmint/cinnamon
Issue tương tự
-
type: bug
Độ 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 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
fmhy/edit#7340 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-amazon-bedrock: a tool result that isn't a JSON object fails the next requestCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] Toolchain versions from `.prototools` are not inherited when moon runs from a subdirectoryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Edit: Tele1 Logo [SV]Đang mởcheck:passed logos:edit
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày