{"description": "The kernel may merge similar slabs together to reduce overhead and increase\ncache hotness of objects.\nDisabling merging of slabs keeps the slabs separate and reduces the risk of\nkernel heap overflows overwriting objects in merged caches.\n\nTo disable merging of slabs in the Kernel add the argument <tt>slab_nomerge=yes</tt>\nto the default GRUB 2 command line for the Linux operating system.\nTo ensure that <tt>slab_nomerge=yes</tt> is added as a kernel command line\nargument to newly installed kernels, add <tt>slab_nomerge=yes</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=\"... slab_nomerge=yes ...\"</pre>\nRun the following command to update command line for already installed kernels:<pre># update-grub</pre>", "rationale": "Disabling the merge of slabs of similar sizes prevents the kernel from\nmerging a seemingly useless but vulnerable slab with a useful and valuable slab.\nThis increase the risk that a heap overflow could overwrite objects from merged caches,\nwith unmerged caches the heap overflow would only affect the objects in the same cache.\nOverall, this reduces the kernel attack surface area by isolating slabs from each other.", "severity": "medium", "references": {"anssi": ["R8"]}, "control_references": {"anssi": ["R8"]}, "components": [], "identifiers": {}, "ocil_clause": "merging of slabs with similar size is 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>slab_nomerge=yes</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.*slab_nomerge=yes.*' /etc/default/grub</pre>\nIf the recovery is disabled, check the line with\n<pre>$ sudo grep 'GRUB_CMDLINE_LINUX.*slab_nomerge=yes.*' /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>slab_nomerge=yes</tt>, then the parameter\nis configured at boot time.\n<pre>$ sudo grep vmlinuz GRUB_CFG_FILE_PATH | grep -v 'slab_nomerge=yes'</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": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [{"performance": "Disabling merge of slabs will slightly increase kernel memory utilization."}], "conflicts": [], "requires": [], "policy_specific_content": {}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": ["grub2 and system_with_kernel"], "cpe_platform_names": [], "inherited_cpe_platform_names": ["grub2_and_system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Disable merging of slabs with similar size", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/bootloader-grub2/grub2_slab_nomerge_argument/rule.yml", "template": {"name": "grub2_bootloader_argument", "vars": {"arg_name": "slab_nomerge", "arg_value": "yes"}, "backends": {}}}