Go to file
Tommy Webb c013c8dd79 Use BPF to block socket creation when restricted
Adapt BPF's inet socket creation rule to not only check INTERNET
permission but also to ensure the uid is on the allowlist for
restricted networking (has RESTRICTED_MATCH flag).

Also includes squashed change:

Author: Tommy Webb <tommy@calyxinstitute.org>
Date:   Thu Sep 7 03:59:21 2023 -0400

    Deny socket creation for transport-blocked apps

    Prevent apps whose network access is blocked based on transport
    policies from creating sockets, too. Update the logic to match AOSP's
    "funky bit-wise arithmetic" from the latest Connectivity mainline.

    Test: Manual: Turn on Private DNS. Install Terminal Emulator. Connect
    to Wi-Fi (no VPN). Set Terminal Emulator's toggles to disable Wi-Fi.
    Run: `ping duckduckgo.com`. Should receive "unknown host" error, NOT
    "Network is unreachable". Same "unknown host" error should occur when
    testing with overall network access turned off for Terminal Emulator,
    with and without its Wi-Fi access also turned off.

    Issue: calyxos#581
    Change-Id: I995e9929f6f8c1ae0613e05e0cade55a76c35902

Co-authored-by: Oliver Scott <olivercscott@gmail.com>
Change-Id: I912a4a2ee78a29ca8b7d8ff85e5ad7cf617c31a5
Signed-off-by: Mohammad Hasan Keramat J <ikeramat@protonmail.com>
2024-07-18 15:35:48 +05:30
Cronet cronet tests: Do not run integration tests on R 2023-06-08 20:36:44 +00:00
Tethering Disallow non-VPN tethering upstreams on always-on VPN lockdown mode 2024-07-18 15:28:05 +05:30
bpf_progs Use BPF to block socket creation when restricted 2024-07-18 15:35:48 +05:30
common Fix errorprone warnings that should be errors 2022-11-02 10:13:14 -07:00
framework Merge UP1A.230620.001 2023-06-21 21:35:26 +00:00
framework-t Connectivity: Disable TrafficStats debugging 2024-04-09 13:10:23 +05:30
nearby Merge UP1A.230905.011 2023-07-31 15:12:42 -07:00
netd BpfHandler: abort on U+ if unexpected cgroup mount path 2023-06-02 06:38:57 +00:00
service Import translations. DO NOT MERGE ANYWHERE 2023-07-13 21:36:59 -07:00
service-t Merge changes I178ed839,Iff78d02a into udc-dev 2023-06-09 09:34:58 +00:00
tests Merge tag 'android-14.0.0_r11' of https://android.googlesource.com/platform/packages/modules/Connectivity into HEAD 2023-10-17 12:15:33 +09:00
tools gn2bp: delete obsolete version in p/m/C 2023-03-29 16:23:45 -07:00
.gitignore
OWNERS
OWNERS_core_networking Cleanup OWNERS 2023-01-23 15:55:23 +00:00
OWNERS_core_networking_xts Allow jchalard@, maze@ and reminv@ to approve fixes for flaky tests. 2022-10-06 09:06:20 +00:00
PREUPLOAD.cfg
TEST_MAPPING [Cronet] Filter out large tests from presubmit 2023-04-03 18:10:01 +00:00