AZLX-23-000215 - Amazon Linux 2023 must disable access to network bpf system call from nonprivileged processes.

Information

Loading and accessing the packet filters programs and maps using the bpf() system call has the potential of revealing sensitive information about the kernel state.

Solution

Configure Amazon Linux 2023 to prevent privilege escalation through the kernel by disabling access to the bpf syscall by adding the following line to a file, in the "/etc/sysctl.d" directory:

kernel.unprivileged_bpf_disabled = 1

The system configuration files must be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Amazon_Linux_2023_V1R1_STIG.zip

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-2, CAT|II, CCI|CCI-001082, Rule-ID|SV-274004r1120000_rule, STIG-ID|AZLX-23-000215, Vuln-ID|V-274004

Plugin: Unix

Control ID: 706dff172fb53b92883568a0491c10f78bec02129e1bbdaee6206c17d3e7bc61