Commit 8570531
[Backport] CVE-2021-30590: Heap buffer overflow in Bookmarks
Partial cherry-pick of patch originally reviewed on
https://chromium-review.googlesource.com/c/chromium/src/+/3073100:
[M90-LTS] Fix RecentlyUsedFoldersComboModel heap overflows
This fixes a few bugs:
* RecentlyUsedFoldersComboModel::RemoveNode() would not inform its
observers of changes.
* RecentlyUsedFoldersComboModel::GetDefaultIndex() did not behave well
after model changes (could end up using a cached out-of-bounds index).
* BubbleDialogModelHost would not pass on selected-index updates unless
the user changed the index by performing a combobox action (not true
when an Extension removes a bookmark folder).
This also replaces off-by-one index correction changes with CHECKs for
index correctness inside views::Combobox. This turns security bugs into
crash bugs and also is likelier to get us better crash stacks if this
happens in the wild as well.
(cherry picked from commit d2e1d6871cf7ca9dbbc82a400be49234d20f98cf)
Bug: 1227777
Change-Id: I9b851129fee4bdd249c1db77b01312b6671784be
Commit-Queue: Peter Boström <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#904551}
Reviewed-by: Achuith Bhandarkar <[email protected]>
Commit-Queue: Zakhar Voit <[email protected]>
Owners-Override: Achuith Bhandarkar <[email protected]>
Cr-Commit-Position: refs/branch-heads/4430@{#1562}
Cr-Branched-From: e5ce7dc4f7518237b3d9bb93cccca35d25216cbe-refs/heads/master@{#857950}
Reviewed-by: Allan Sandfeld Jensen <[email protected]>1 parent f982e88 commit 8570531
File tree
3 files changed
+29
-15
lines changed- chromium/ui/views
- bubble
- controls/combobox
3 files changed
+29
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
| 60 | + | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
254 | 253 | | |
255 | 254 | | |
256 | 255 | | |
257 | | - | |
258 | | - | |
| 256 | + | |
| 257 | + | |
259 | 258 | | |
260 | 259 | | |
261 | 260 | | |
| |||
464 | 463 | | |
465 | 464 | | |
466 | 465 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | 466 | | |
473 | 467 | | |
474 | 468 | | |
475 | 469 | | |
476 | | - | |
477 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
| |||
430 | 436 | | |
431 | 437 | | |
432 | 438 | | |
| 439 | + | |
| 440 | + | |
433 | 441 | | |
434 | 442 | | |
435 | | - | |
| 443 | + | |
436 | 444 | | |
437 | 445 | | |
438 | 446 | | |
| |||
618 | 626 | | |
619 | 627 | | |
620 | 628 | | |
621 | | - | |
622 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
623 | 634 | | |
624 | | - | |
| 635 | + | |
625 | 636 | | |
626 | 637 | | |
627 | 638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
0 commit comments