{"description": "To disable use of virtual syscalls,\nadd the argument <tt>vsyscall=none</tt> to the default\nGRUB 2 command line for the Linux operating system.\nTo ensure that <tt>vsyscall=none</tt> is added as a kernel command line\nargument to newly installed kernels, add <tt>vsyscall=none</tt> to the\ndefault Grub2 command line for Linux operating systems. Modify the line within\n<tt>/etc/default/grub</tt> as shown below:\n<pre>GRUB_CMDLINE_LINUX=\"... vsyscall=none ...\"</pre>\nRun the following command to update command line for already installed kernels:<pre># update-grub</pre>", "rationale": "Virtual Syscalls provide an opportunity of attack for a user who has control\nof the return instruction pointer.", "severity": "medium", "references": {"nist": ["CM-7(a)"], "ospp": ["FPT_ASLR_EXT.1"], "srg": ["SRG-OS-000480-GPOS-00227", "SRG-OS-000134-GPOS-00068"]}, "control_references": {}, "components": [], "identifiers": {}, "ocil_clause": "vsyscalls are enabled", "ocil": "Inspect the form of default GRUB 2 command line for the Linux operating system\nin <tt>/etc/default/grub</tt>. If it includes <tt>vsyscall=none</tt>,\nthen the parameter will be configured for newly installed kernels.\nFirst check if the GRUB recovery is enabled:\n<pre>$ sudo grep 'GRUB_DISABLE_RECOVERY' /etc/default/grub</pre>\nIf this option is set to true, then check that a line is output by the following command:\n<pre>$ sudo grep 'GRUB_CMDLINE_LINUX_DEFAULT.*vsyscall=none.*' /etc/default/grub</pre>\nIf the recovery is disabled, check the line with\n<pre>$ sudo grep 'GRUB_CMDLINE_LINUX.*vsyscall=none.*' /etc/default/grub</pre>.Moreover, current Grub config file <tt>grub.cfg</tt> must be checked. The file can be found\neither in <tt>/boot/grub</tt> in case of legacy BIOS systems, or in <tt>/boot/grub</tt> in case of UEFI systems.\nIf they include <tt>vsyscall=none</tt>, then the parameter\nis configured at boot time.\n<pre>$ sudo grep vmlinuz GRUB_CFG_FILE_PATH | grep -v 'vsyscall=none'</pre>\nFill in <tt>GRUB_CFG_FILE_PATH</tt> based on information above.\nThis command should not return any output.", "oval_external_content": null, "fixtext": "To ensure that <tt>vsyscall=none</tt> is added as a kernel command line\nargument to newly installed kernels, add <tt>vsyscall=none</tt> to the\ndefault Grub2 command line for Linux operating systems. Modify the line within\n<tt>/etc/default/grub</tt> as shown below:\n<pre>GRUB_CMDLINE_LINUX=\"... vsyscall=none ...\"</pre>\nRun the following command to update command line for already installed kernels:<pre># update-grub</pre>", "checktext": "", "vuldiscussion": "", "srg_requirement": "Ubuntu 22.04 must disable virtual syscalls.", "warnings": [{"general": "The vsyscall emulation is only available on x86_64 architecture\n(CONFIG_X86_VSYSCALL_EMULATION) making this rule not applicable\nto other CPU architectures."}], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 must disable virtual system calls.", "vuldiscussion": "System calls are special routines in the Linux kernel, which userspace applications ask to do privileged tasks. Invoking a system call is an expensive operation because the processor must interrupt the currently executing task and switch context to kernel mode and then back to userspace after the system call completes. Virtual system calls map into user space a page that contains some variables and the implementation of some system calls. This allows the system calls to be executed in userspace to alleviate the context switching expense.\n\nVirtual system calls provide an opportunity of attack for a user who has control of the return instruction pointer. Disabling virtual system calls help to prevent return oriented programming (ROP) attacks via buffer overflows and overruns. If the system intends to run containers based on RHEL 6 components, then virtual system calls will need enabled so the components function properly.", "checktext": "Verify the current GRUB 2 configuration disables virtual system calls with the following command:\n\n$ sudo grubby --info=ALL | grep args | grep -v 'vsyscall=none'\n\nIf any output is returned, this is a finding.\n\nCheck that virtual system calls are disabled by default to persist in kernel updates with the following command:\n\n$ sudo grep vsyscall /etc/default/grub\n\nGRUB_CMDLINE_LINUX=\"vsyscall=none\"\n\nIf \"vsyscall\" is not set to \"none\", is missing or commented out, and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.", "fixtext": "Document the use of virtual system calls with the ISSO as an operational requirement or disable them with the following command:\n\n$ sudo grubby --update-kernel=ALL --args=\"vsyscall=none\"\n\nAdd or modify the following line in \"/etc/default/grub\" to ensure the configuration survives kernel updates:\n\nGRUB_CMDLINE_LINUX=\"vsyscall=none\""}}, "platform": "x86_64_arch", "platforms": ["x86_64_arch"], "sce_metadata": {}, "inherited_platforms": ["grub2 and system_with_kernel"], "cpe_platform_names": ["x86_64_arch"], "inherited_cpe_platform_names": ["grub2_and_system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Disable vsyscalls", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml", "template": {"name": "grub2_bootloader_argument", "vars": {"arg_name": "vsyscall", "arg_value": "none"}, "backends": {}}}