[email protected]: empty pseudo class from format_timespan() causes heap over-read in St find_class_name() and crashes Cinnamon
メンテナーはふだん 8 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- desktop
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 5.7k
- フォーク
- 941
- 平均マージ
- 7日 9時間
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
linuxmint/cinnamon のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 8 日以内に返信
-
BUG
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 8 日以内に返信
-
Sound applet: seek bar jumps back after seeking when player resends metadata (e.g. mpDris2/MPD)オープンBUG
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 8 日以内に返信
-
Menu applet omits descriptions from search-provider results対応中かも @ah682 が 8 日前に担当しました。 オープンBUG
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
linuxmint/cinnamon#14104 · コメント 2 件 ·
メンテナーはふだん 8 日以内に返信
-
xapp-status applet: status icon labels are ellipsized to "..." when the panel zone is a fraction of a pixel short再び着手できるかも @Priyeshshrivastav が 14 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
linuxmint/cinnamon#14096 · コメント 1 件 ·
メンテナーはふだん 8 日以内に返信
linuxmint/cinnamon の issue をすべて見る
似ている issue
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
ai-amazon-bedrock: a tool result that isn't a JSON object fails the next request対応中かも @effect-bot が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
[bug] Toolchain versions from `.prototools` are not inherited when moon runs from a subdirectoryオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
check:passed logos:edit
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信