-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: att: Fix EATT channel security requirements #46982
Conversation
The change seems OK, but I was wondering: Why do we not just ensure that the ACL is encrypted before allowing EATT channels to be established? If we cannot use EATT while not encrypted, then there's not really any reason to even establish them. |
You have right. The fix would be even cleaner, as there the check won't be evaluated on every PDU. Thanks! |
We may want to check if this causes some IOP issues: Does the core spec say anything about encryption level before establishing EATT channels? We may experience some IOP issues if we change it to that. The auto-EATT connection we have in Zephyr would also need to be changed from when it's connected (done in @hermabe Any input here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that this won't cause IOP issues, LGTM to me
#AutoPTS autotest run zephyr GATT |
tests/bluetooth/bsim_bt/bsim_test_gatt_caching/src/gatt_server_test.c
Outdated
Show resolved
Hide resolved
Core Vol 3, Part G, Section 5.3.2 Channel Requirements states that "The channel shall be encrypted". It does not mention any additional security requirements that can be specified bt higher layer profiles. This enables link encryption requirement for EATT channel. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This reverts commit f3444ce. The check is not needed anymore, as the EATT channels are available on encrypted link only. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The spec is really vague on this requirement. It only says "the channel shall be encrypted". I haven't seen any special requirement that the link shall be encrypted before the channels are connected. It may be ok to connect, but not send over EATT channels without encryption (the current implementation). In that case, we may want to allow incoming requests/etc. without encryption for IOP reasons. Requiring the link to be encrypted before the channels are established is stricter, but should be within the spec. This is also cleaner as the peer gets an auth error code in response to the connection request. From some brief testing with my phone (Android 12) some time ago, the phone did not check the encryption requirement and allowed notifications to be received over EATT without encryption. |
#AutoPTS run zephyr GATT |
Scheduled PR ##46982 (comment) after 16:09:00. |
AutoPTS Bot results: |
@sjanc Those test cases failed in Bluetooth test session - WW26.3 as well |
@hermabe I proposed to change "The channel shall be encrypted." into "The channel shall be created and used on encrypted link" https://www.bluetooth.org/errata/errata_view.cfm?errata_id=19172 |
Hmm, that's a shame. w.r.t. IOP issues, then this shouldn't give any real issues: Worst case scenario is that the EATT channels are not established, and there isn't any usecase (yet) that is "EATT only". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This approach seems cleaner than connecting EATT channels that cannot be used.
Core Vol 3, Part G, Section 5.3.2 Channel Requirements states that
"The channel shall be encrypted". It does not mention any additional
security requirements that can be specified bt higher layer profiles.
This enables link encryption requirement for EATT channel.
Signed-off-by: Mariusz Skamra mariusz.skamra@codecoup.pl