Commit 737a0c6
[Backport] CVE-2025-12438: Use after free in Ozone
Manual cherry-pick of patch originally reviewed on
https://chromium-review.googlesource.com/c/chromium/src/+/6979565:
Remove idle_inhibitor_ object from WaylandScreen
..to prevent UAF on chrome shutdown. Unlike most objects created by
WaylandConnection, WaylandScreen is owned by ChromeBrowserMainExtraParts
and outlives WaylandConnection.
To prevent accessing wl_display internals after destruction of
WaylandConnection, WaylandScreen should either destroy wl::Object when
connection resets, or reference wl::Object indirectly.
Manage inhibitor in zwp_idle_inhibit_manager. Also fix a logic in
IsScreenSaverActive() where `inhibitor` mean screen saver is blocked.
Bug: 433027577, 433643249
Change-Id: If02755ddced08f8cf795ac21ed144387d0aa4077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6979565
Commit-Queue: Kramer Ge <[email protected]>
Reviewed-by: Thomas Anderson <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1520174}
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/689570
Reviewed-by: Michal Klocek <[email protected]>1 parent 01924ef commit 737a0c6
File tree
4 files changed
+49
-26
lines changed- chromium/ui/ozone/platform/wayland/host
4 files changed
+49
-26
lines changedLines changed: 6 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 436 | + | |
452 | 437 | | |
453 | | - | |
| 438 | + | |
454 | 439 | | |
455 | 440 | | |
456 | 441 | | |
457 | 442 | | |
458 | 443 | | |
459 | 444 | | |
460 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
461 | 449 | | |
462 | 450 | | |
463 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
56 | 81 | | |
57 | 82 | | |
58 | 83 | | |
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| |||
0 commit comments