Commit 27651c4
bluetooth: Fix missing blocklist check for characteristic in descriptors
Web Bluetooth fails to check the GATT blocklist for a descriptor's
parent characteristic during read and write operations. This allows
websites to bypass security restrictions and interact with descriptors
of protected characteristics.
This CL adds checks in `RemoteDescriptorReadValue` and
`RemoteDescriptorWriteValue` to ensure that the parent characteristic is
also checked against the GATT blocklist before allowing read or write
operations on its descriptors.
Unit tests are added to verify that reads and writes are blocked when
the parent characteristic is blocklisted.
Bug: 503912196
Change-Id: If62e10d5ac66ed414aec1a3a4af346133a584374
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7837659
Commit-Queue: Rob Pitkin <robpitkin@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1631633}1 parent cc8f0fb commit 27651c4
1 file changed
Lines changed: 36 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
613 | | - | |
614 | | - | |
615 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
616 | 628 | | |
| 629 | + | |
| 630 | + | |
617 | 631 | | |
618 | | - | |
| 632 | + | |
619 | 633 | | |
620 | 634 | | |
621 | 635 | | |
| |||
641 | 655 | | |
642 | 656 | | |
643 | 657 | | |
644 | | - | |
645 | | - | |
646 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
647 | 672 | | |
648 | | - | |
649 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
650 | 677 | | |
651 | 678 | | |
652 | 679 | | |
| |||
0 commit comments