{"description": "The TPM security chip that is available in most modern systems has a hardware RNG.\nIt is also used to feed the entropy pool, but generally not credited entropy.\n\nUse <tt>rng_core.default_quality</tt> in the kernel command line to set the trust\nlevel on the hardware generators. The trust level defines the amount of entropy to credit.\nA value of <tt>0</tt> tells the system not to trust the hardware random number generators\navailable, and doesn't credit any entropy to the pool.\nA value of <tt>1000</tt> assigns full confidence in the generators, and credits all the\nentropy it provides to the pool.\n\nNote that the value of <tt>rng_core.default_quality</tt> is global, affecting the trust\non all hardware random number generators.\n\nSelect the appropriate confidence by adding the argument\n<tt>rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" /></tt> to the default\nGRUB 2 command line for the Linux operating system.\nTo ensure that <tt>rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" /></tt> is added as a kernel command line\nargument to newly installed kernels, add <tt>rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" /></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=\"... rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" /> ...\"</pre>\nRun the following command to update command line for already installed kernels:<pre># update-grub</pre>", "rationale": "A system may struggle to initialize its entropy pool and end up starving. Crediting entropy\nfrom the hardware number generators available in the system helps fill up the entropy pool.", "severity": "low", "references": {"anssi": ["R8"]}, "control_references": {"anssi": ["R8"]}, "components": [], "identifiers": {}, "ocil_clause": "trust on hardware random number generator is not configured appropriately", "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>rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" /></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.*rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" />.*' /etc/default/grub</pre>\nIf the recovery is disabled, check the line with\n<pre>$ sudo grep 'GRUB_CMDLINE_LINUX.*rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" />.*' /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>rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" /></tt>, then the parameter\nis configured at boot time.\n<pre>$ sudo grep vmlinuz GRUB_CFG_FILE_PATH | grep -v 'rng_core.default_quality=<sub idref=\"var_rng_core_default_quality\" />'</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": [], "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": "Configure the confidence in TPM for entropy", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/bootloader-grub2/grub2_rng_core_default_quality_argument/rule.yml", "template": {"name": "grub2_bootloader_argument", "vars": {"arg_name": "rng_core.default_quality", "arg_variable": "var_rng_core_default_quality"}, "backends": {}}}