{"id":"CVE-2025-21719","state":"PUBLISHED","title":"ipmr: do not call mr_mfc_uses_dev() for unres entries","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nipmr: do not call mr_mfc_uses_dev() for unres entries\n\nsyzbot found that calling mr_mfc_uses_dev() for unres entries\nwould crash [1], because c->mfc_un.res.minvif / c->mfc_un.res.maxvif\nalias to \"struct sk_buff_head unresolved\", which contain two pointers.\n\nThis code never worked, lets remove it.\n\n[1]\nUnable to handle kernel paging request at virtual address ffff5fff2d536613\nKASAN: maybe wild-memory-access in range [0xfffefff96a9b3098-0xfffefff96a9b309f]\nModules linked in:\nCPU: 1 UID: 0 PID: 7321 Comm: syz.0.16 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024\npstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n pc : mr_mfc_uses_dev net/ipv4/ipmr_base.c:290 [inline]\n pc : mr_table_dump+0x5a4/0x8b0 net/ipv4/ipmr_base.c:334\n lr : mr_mfc_uses_dev net/ipv4/ipmr_base.c:289 [inline]\n lr : mr_table_dump+0x694/0x8b0 net/ipv4/ipmr_base.c:334\nCall trace:\n  mr_mfc_uses_dev net/ipv4/ipmr_base.c:290 [inline] (P)\n  mr_table_dump+0x5a4/0x8b0 net/ipv4/ipmr_base.c:334 (P)\n  mr_rtm_dumproute+0x254/0x454 net/ipv4/ipmr_base.c:382\n  ipmr_rtm_dumproute+0x248/0x4b4 net/ipv4/ipmr.c:2648\n  rtnl_dump_all+0x2e4/0x4e8 net/core/rtnetlink.c:4327\n  rtnl_dumpit+0x98/0x1d0 net/core/rtnetlink.c:6791\n  netlink_dump+0x4f0/0xbc0 net/netlink/af_netlink.c:2317\n  netlink_recvmsg+0x56c/0xe64 net/netlink/af_netlink.c:1973\n  sock_recvmsg_nosec net/socket.c:1033 [inline]\n  sock_recvmsg net/socket.c:1055 [inline]\n  sock_read_iter+0x2d8/0x40c net/socket.c:1125\n  new_sync_read fs/read_write.c:484 [inline]\n  vfs_read+0x740/0x970 fs/read_write.c:565\n  ksys_read+0x15c/0x26c fs/read_write.c:708","publishedAt":"2025-02-27T02:07:28.573Z","updatedAt":"2026-10-15T21:51:52.573Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"71a0fcb68c0a5f3ec912b540cd5d72148e6ee5f1","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"53df27fd38f84bd3cd6b004eb4ff3c4903114f1d","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"547ef7e8cbb98f966c8719a3e15d4e078aaa9b47","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"57177c5f47a8da852f8d76cf6945cf803f8bb9e5","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"b379b3162ff55a70464c6a934ae9bf0497478a62","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"a099834a51ccf9bbba3de86a251b3433539abfde","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"26bb7d991f04eeef47dfad23e533834995c26f7a","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"15a901361ec3fb1c393f91880e1cbf24ec0a88bd","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/ipmr_base.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.20","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.20","versionType":"semver"},{"version":"5.4.291","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.235","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.179","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.76","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.13","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.2","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/ipmr_base.c"]}],"references":["https://git.kernel.org/stable/c/71a0fcb68c0a5f3ec912b540cd5d72148e6ee5f1","https://git.kernel.org/stable/c/53df27fd38f84bd3cd6b004eb4ff3c4903114f1d","https://git.kernel.org/stable/c/547ef7e8cbb98f966c8719a3e15d4e078aaa9b47","https://git.kernel.org/stable/c/57177c5f47a8da852f8d76cf6945cf803f8bb9e5","https://git.kernel.org/stable/c/b379b3162ff55a70464c6a934ae9bf0497478a62","https://git.kernel.org/stable/c/a099834a51ccf9bbba3de86a251b3433539abfde","https://git.kernel.org/stable/c/26bb7d991f04eeef47dfad23e533834995c26f7a","https://git.kernel.org/stable/c/15a901361ec3fb1c393f91880e1cbf24ec0a88bd","https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html","https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","https://cert-portal.siemens.com/productcert/html/ssa-265688.html","https://cert-portal.siemens.com/productcert/html/ssa-784472.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/21xxx/CVE-2025-21719.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21719","state":"PUBLISHED","datePublished":"2025-02-27T02:07:28.573Z","dateUpdated":"2026-10-15T21:51:52.573Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.753Z"},"containers":{"cna":{"title":"ipmr: do not call mr_mfc_uses_dev() for unres entries","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nipmr: do not call mr_mfc_uses_dev() for unres entries\n\nsyzbot found that calling mr_mfc_uses_dev() for unres entries\nwould crash [1], because c->mfc_un.res.minvif / c->mfc_un.res.maxvif\nalias to \"struct sk_buff_head unresolved\", which contain two pointers.\n\nThis code never worked, lets remove it.\n\n[1]\nUnable to handle kernel paging request at virtual address ffff5fff2d536613\nKASAN: maybe wild-memory-access in range [0xfffefff96a9b3098-0xfffefff96a9b309f]\nModules linked in:\nCPU: 1 UID: 0 PID: 7321 Comm: syz.0.16 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024\npstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n pc : mr_mfc_uses_dev net/ipv4/ipmr_base.c:290 [inline]\n pc : mr_table_dump+0x5a4/0x8b0 net/ipv4/ipmr_base.c:334\n lr : mr_mfc_uses_dev net/ipv4/ipmr_base.c:289 [inline]\n lr : mr_table_dump+0x694/0x8b0 net/ipv4/ipmr_base.c:334\nCall trace:\n  mr_mfc_uses_dev net/ipv4/ipmr_base.c:290 [inline] (P)\n  mr_table_dump+0x5a4/0x8b0 net/ipv4/ipmr_base.c:334 (P)\n  mr_rtm_dumproute+0x254/0x454 net/ipv4/ipmr_base.c:382\n  ipmr_rtm_dumproute+0x248/0x4b4 net/ipv4/ipmr.c:2648\n  rtnl_dump_all+0x2e4/0x4e8 net/core/rtnetlink.c:4327\n  rtnl_dumpit+0x98/0x1d0 net/core/rtnetlink.c:6791\n  netlink_dump+0x4f0/0xbc0 net/netlink/af_netlink.c:2317\n  netlink_recvmsg+0x56c/0xe64 net/netlink/af_netlink.c:1973\n  sock_recvmsg_nosec net/socket.c:1033 [inline]\n  sock_recvmsg net/socket.c:1055 [inline]\n  sock_read_iter+0x2d8/0x40c net/socket.c:1125\n  new_sync_read fs/read_write.c:484 [inline]\n  vfs_read+0x740/0x970 fs/read_write.c:565\n  ksys_read+0x15c/0x26c fs/read_write.c:708"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"71a0fcb68c0a5f3ec912b540cd5d72148e6ee5f1","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"53df27fd38f84bd3cd6b004eb4ff3c4903114f1d","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"547ef7e8cbb98f966c8719a3e15d4e078aaa9b47","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"57177c5f47a8da852f8d76cf6945cf803f8bb9e5","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"b379b3162ff55a70464c6a934ae9bf0497478a62","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"a099834a51ccf9bbba3de86a251b3433539abfde","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"26bb7d991f04eeef47dfad23e533834995c26f7a","versionType":"git"},{"version":"cb167893f41e21e6bd283d78e53489289dc0592d","status":"affected","lessThan":"15a901361ec3fb1c393f91880e1cbf24ec0a88bd","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/ipmr_base.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.20","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.20","versionType":"semver"},{"version":"5.4.291","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.235","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.179","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.76","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.13","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.2","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/ipmr_base.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/71a0fcb68c0a5f3ec912b540cd5d72148e6ee5f1"},{"url":"https://git.kernel.org/stable/c/53df27fd38f84bd3cd6b004eb4ff3c4903114f1d"},{"url":"https://git.kernel.org/stable/c/547ef7e8cbb98f966c8719a3e15d4e078aaa9b47"},{"url":"https://git.kernel.org/stable/c/57177c5f47a8da852f8d76cf6945cf803f8bb9e5"},{"url":"https://git.kernel.org/stable/c/b379b3162ff55a70464c6a934ae9bf0497478a62"},{"url":"https://git.kernel.org/stable/c/a099834a51ccf9bbba3de86a251b3433539abfde"},{"url":"https://git.kernel.org/stable/c/26bb7d991f04eeef47dfad23e533834995c26f7a"},{"url":"https://git.kernel.org/stable/c/15a901361ec3fb1c393f91880e1cbf24ec0a88bd"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable loop is reached only through an RTM_GETROUTE netlink dump (`rtnl_dump_all` → `ipmr_rtm_dumproute` → `mr_table_dump`) issued on a local AF_NETLINK socket. Although the unresolved cache entry itself is created by an incoming multicast packet, the crash requires the local netlink request, so the attack vector is Local.\nAC:L - The attacker fully controls both halves — creating unresolved MFC entries by sending multicast packets into a vif, and issuing the RTA_OIF-filtered strict-check dump — and can repeat this arbitrarily until an entry whose aliased pointer halves satisfy `minvif < maxvif` is walked. No condition outside the attacker's influence is required.\nPR:L - Netlink route dumps require no capability at all (rtnetlink only enforces CAP_NET_ADMIN for non-GET messages), and the multicast-routing setup that populates `mfc_unres_queue` is gated on CAP_NET_RAW/`ns_capable(net->user_ns, CAP_NET_ADMIN)`, both obtainable by any unprivileged user via `unshare -Urn`. On a host already running a multicast routing daemon, an unprivileged user needs only the dump.\nUI:N - The attacker performs every step itself — socket setup, multicast packet injection, and the netlink dump — with no action by any other user or administrator.\nS:U - The out-of-bounds access and its consequences are confined to the kernel's own memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The loop performs unbounded, wild out-of-bounds reads of kernel memory at indices derived from a heap pointer, spanning arbitrarily far outside `mrt->vif_table` and the mfc allocation, and the result feeds a userspace-observable dump-filtering decision that acts as an oracle on that out-of-bounds kernel memory.\nI:N - `mr_mfc_uses_dev()` is a purely read-only loop and `mr_fill_mroute()` returns early for unresolved entries, so no kernel memory is written or corrupted by this bug.\nA:H - The wild indexing causes a kernel paging fault / KASAN wild-memory-access oops, as reported by syzbot, and the near-billion-iteration loop runs while holding `mfc_unres_lock` with softirqs disabled, risking soft lockup and RCU stalls — a reliably reproducible kernel crash or hang."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:53:54.833Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.4.291"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.10.235"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.15.179"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.6.76"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.12.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.13.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:36:16.326Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:03:42.723Z"},"x_adpType":"supplier"},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-21719","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-15T21:42:48.262327Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:51:52.573Z"}}]}}}