{"id":"CVE-2025-68199","aliases":["CVE-2025-68199"],"related":[],"kind":"vulnerability","state":"published","title":"codetag: debug: handle existing CODETAG_EMPTY in mark_objexts_empty for slabobj_ext","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncodetag: debug: handle existing CODETAG_EMPTY in mark_objexts_empty for slabobj_ext\n\nWhen alloc_slab_obj_exts() fails and then later succeeds in allocating a\nslab extension vector, it calls handle_failed_objexts_alloc() to mark all\nobjects in the vector as empty.  As a result all objects in this slab\n(slabA) will have their extensions set to CODETAG_EMPTY.\n\nLater on if this slabA is used to allocate a slabobj_ext vector for\nanother slab (slabB), we end up with the slabB->obj_exts pointing to a\nslabobj_ext vector that itself has a non-NULL slabobj_ext equal to\nCODETAG_EMPTY.  When slabB gets freed, free_slab_obj_exts() is called to\nfree slabB->obj_exts vector.  \n\nfree_slab_obj_exts() calls mark_objexts_empty(slabB->obj_exts) which will\ngenerate a warning because it expects slabobj_ext vectors to have a NULL\nobj_ext, not CODETAG_EMPTY.\n\nModify mark_objexts_empty() to skip the warning and setting the obj_ext\nvalue if it's already set to CODETAG_EMPTY.\n\n\nTo quickly detect this WARN, I modified the code from\nWARN_ON(slab_exts[offs].ref.ct) to BUG_ON(slab_exts[offs].ref.ct == 1);\n\nWe then obtained this message:\n\n[21630.898561] ------------[ cut here ]------------\n[21630.898596] kernel BUG at mm/slub.c:2050!\n[21630.898611] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP\n[21630.900372] Modules linked in: squashfs isofs vfio_iommu_type1 \nvhost_vsock vfio vhost_net vmw_vsock_virtio_transport_common vhost tap \nvhost_iotlb iommufd vsock binfmt_misc nfsv3 nfs_acl nfs lockd grace \nnetfs tls rds dns_resolver tun brd overlay ntfs3 exfat btrfs \nblake2b_generic xor xor_neon raid6_pq loop sctp ip6_udp_tunnel \nudp_tunnel nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib \nnft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct \nnft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 \nnf_tables rfkill ip_set sunrpc vfat fat joydev sg sch_fq_codel nfnetlink \nvirtio_gpu sr_mod cdrom drm_client_lib virtio_dma_buf drm_shmem_helper \ndrm_kms_helper drm ghash_ce backlight virtio_net virtio_blk virtio_scsi \nnet_failover virtio_console failover virtio_mmio dm_mirror \ndm_region_hash dm_log dm_multipath dm_mod fuse i2c_dev virtio_pci \nvirtio_pci_legacy_dev virtio_pci_modern_dev virtio virtio_ring autofs4 \naes_neon_bs aes_ce_blk [last unloaded: hwpoison_inject]\n[21630.909177] CPU: 3 UID: 0 PID: 3787 Comm: kylin-process-m Kdump: \nloaded Tainted: G        W           6.18.0-rc1+ #74 PREEMPT(voluntary)\n[21630.910495] Tainted: [W]=WARN\n[21630.910867] Hardware name: QEMU KVM Virtual Machine, BIOS unknown \n2/2/2022\n[21630.911625] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS \nBTYPE=--)\n[21630.912392] pc : __free_slab+0x228/0x250\n[21630.912868] lr : __free_slab+0x18c/0x250[21630.913334] sp : \nffff8000a02f73e0\n[21630.913830] x29: ffff8000a02f73e0 x28: fffffdffc43fc800 x27: \nffff0000c0011c40\n[21630.914677] x26: ffff0000c000cac0 x25: ffff00010fe5e5f0 x24: \nffff000102199b40\n[21630.915469] x23: 0000000000000003 x22: 0000000000000003 x21: \nffff0000c0011c40\n[21630.916259] x20: fffffdffc4086600 x19: fffffdffc43fc800 x18: \n0000000000000000\n[21630.917048] x17: 0000000000000000 x16: 0000000000000000 x15: \n0000000000000000\n[21630.917837] x14: 0000000000000000 x13: 0000000000000000 x12: \nffff70001405ee66\n[21630.918640] x11: 1ffff0001405ee65 x10: ffff70001405ee65 x9 : \nffff800080a295dc\n[21630.919442] x8 : ffff8000a02f7330 x7 : 0000000000000000 x6 : \n0000000000003000\n[21630.920232] x5 : 0000000024924925 x4 : 0000000000000001 x3 : \n0000000000000007\n[21630.921021] x2 : 0000000000001b40 x1 : 000000000000001f x0 : \n0000000000000001\n[21630.921810] Call trace:\n[21630.922130]  __free_slab+0x228/0x250 (P)\n[21630.922669]  free_slab+0x38/0x118\n[21630.923079]  free_to_partial_list+0x1d4/0x340\n[21630.923591]  __slab_free+0x24c/0x348\n[21630.924024]  ___cache_free+0xf0/0x110\n[21630.924468]  qlist_free_all+0x78/0x130\n[21630.924922]  kasan_quarantine_reduce+0x11\n---truncated---","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncodetag: debug: handle existing CODETAG_EMPTY in mark_objexts_empty for slabobj_ext\n\nWhen alloc_slab_obj_exts() fails and then later succeeds in allocating a\nslab extension vector, it calls handle_failed_objexts_alloc() to mark all\nobjects in the vector as empty.  As a result all objects in this slab\n(slabA) will have their extensions set to CODETAG_EMPTY.\n\nLater on if this slabA is used to allocate a slabobj_ext vector for\nanother slab (slabB), we end up with the slabB->obj_exts pointing to a\nslabobj_ext vector that itself has a non-NULL slabobj_ext equal to\nCODETAG_EMPTY.  When slabB gets freed, free_slab_obj_exts() is called to\nfree slabB->obj_exts vector.  \n\nfree_slab_obj_exts() calls mark_objexts_empty(slabB->obj_exts) which will\ngenerate a warning because it expects slabobj_ext vectors to have a NULL\nobj_ext, not CODETAG_EMPTY.\n\nModify mark_objexts_empty() to skip the warning and setting the obj_ext\nvalue if it's already set to CODETAG_EMPTY.\n\n\nTo quickly detect this WARN, I modified the code from\nWARN_ON(slab_exts[offs].ref.ct) to BUG_ON(slab_exts[offs].ref.ct == 1);\n\nWe then obtained this message:\n\n[21630.898561] ------------[ cut here ]------------\n[21630.898596] kernel BUG at mm/slub.c:2050!\n[21630.898611] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP\n[21630.900372] Modules linked in: squashfs isofs vfio_iommu_type1 \nvhost_vsock vfio vhost_net vmw_vsock_virtio_transport_common vhost tap \nvhost_iotlb iommufd vsock binfmt_misc nfsv3 nfs_acl nfs lockd grace \nnetfs tls rds dns_resolver tun brd overlay ntfs3 exfat btrfs \nblake2b_generic xor xor_neon raid6_pq loop sctp ip6_udp_tunnel \nudp_tunnel nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib \nnft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct \nnft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 \nnf_tables rfkill ip_set sunrpc vfat fat joydev sg sch_fq_codel nfnetlink \nvirtio_gpu sr_mod cdrom drm_client_lib virtio_dma_buf drm_shmem_helper \ndrm_kms_helper drm ghash_ce backlight virtio_net virtio_blk virtio_scsi \nnet_failover virtio_console failover virtio_mmio dm_mirror \ndm_region_hash dm_log dm_multipath dm_mod fuse i2c_dev virtio_pci \nvirtio_pci_legacy_dev virtio_pci_modern_dev virtio virtio_ring autofs4 \naes_neon_bs aes_ce_blk [last unloaded: hwpoison_inject]\n[21630.909177] CPU: 3 UID: 0 PID: 3787 Comm: kylin-process-m Kdump: \nloaded Tainted: G        W           6.18.0-rc1+ #74 PREEMPT(voluntary)\n[21630.910495] Tainted: [W]=WARN\n[21630.910867] Hardware name: QEMU KVM Virtual Machine, BIOS unknown \n2/2/2022\n[21630.911625] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS \nBTYPE=--)\n[21630.912392] pc : __free_slab+0x228/0x250\n[21630.912868] lr : __free_slab+0x18c/0x250[21630.913334] sp : \nffff8000a02f73e0\n[21630.913830] x29: ffff8000a02f73e0 x28: fffffdffc43fc800 x27: \nffff0000c0011c40\n[21630.914677] x26: ffff0000c000cac0 x25: ffff00010fe5e5f0 x24: \nffff000102199b40\n[21630.915469] x23: 0000000000000003 x22: 0000000000000003 x21: \nffff0000c0011c40\n[21630.916259] x20: fffffdffc4086600 x19: fffffdffc43fc800 x18: \n0000000000000000\n[21630.917048] x17: 0000000000000000 x16: 0000000000000000 x15: \n0000000000000000\n[21630.917837] x14: 0000000000000000 x13: 0000000000000000 x12: \nffff70001405ee66\n[21630.918640] x11: 1ffff0001405ee65 x10: ffff70001405ee65 x9 : \nffff800080a295dc\n[21630.919442] x8 : ffff8000a02f7330 x7 : 0000000000000000 x6 : \n0000000000003000\n[21630.920232] x5 : 0000000024924925 x4 : 0000000000000001 x3 : \n0000000000000007\n[21630.921021] x2 : 0000000000001b40 x1 : 000000000000001f x0 : \n0000000000000001\n[21630.921810] Call trace:\n[21630.922130]  __free_slab+0x228/0x250 (P)\n[21630.922669]  free_slab+0x38/0x118\n[21630.923079]  free_to_partial_list+0x1d4/0x340\n[21630.923591]  __slab_free+0x24c/0x348\n[21630.924024]  ___cache_free+0xf0/0x110\n[21630.924468]  qlist_free_all+0x78/0x130\n[21630.924922]  kasan_quarantine_reduce+0x11\n---truncated---","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncodetag: depuración: manejar CODETAG_EMPTY existente en mark_objexts_empty para slabobj_ext\n\nCuando alloc_slab_obj_exts() falla y luego tiene éxito en la asignación de un vector de extensión de slab, llama a handle_failed_objexts_alloc() para marcar todos los objetos en el vector como vacíos. Como resultado, todos los objetos en este slab (slabA) tendrán sus extensiones configuradas a CODETAG_EMPTY.\n\nMás tarde, si este slabA se utiliza para asignar un vector slabobj_ext para otro slab (slabB), terminamos con slabB -> obj_exts apuntando a un vector slabobj_ext que a su vez tiene un slabobj_ext no-NULL igual a CODETAG_EMPTY. Cuando slabB se libera, se llama a free_slab_obj_exts() para liberar el vector slabB -> obj_exts.\n\nfree_slab_obj_exts() llama a mark_objexts_empty(slabB -> obj_exts) lo que generará una advertencia porque espera que los vectores slabobj_ext tengan un obj_ext NULL, no CODETAG_EMPTY.\n\nModificar mark_objexts_empty() para omitir la advertencia y la configuración del valor obj_ext si ya está configurado a CODETAG_EMPTY.\n\nPara detectar rápidamente esta ADVERTENCIA, modifiqué el código de WARN_ON(slab_exts[offs].ref.ct) a BUG_ON(slab_exts[offs].ref.ct == 1);\n\nEntonces obtuvimos este mensaje:\n\n[21630.898561] ------------[ cut here ]------------\n[21630.898596] BUG del kernel en mm/slub.c:2050!\n[21630.898611] Error interno: Oops - BUG: 00000000f2000800 [#1] SMP\n[21630.900372] Módulos enlazados: squashfs isofs vfio_iommu_type1\nvhost_vsock vfio vhost_net vmw_vsock_virtio_transport_common vhost tap\nvhost_iotlb iommufd vsock binfmt_misc nfsv3 nfs_acl nfs lockd grace\nnetfs tls rds dns_resolver tun brd overlay ntfs3 exfat btrfs\nblake2b_generic xor xor_neon raid6_pq loop sctp ip6_udp_tunnel\nudp_tunnel nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib\nnft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct\nnft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4\nnf_tables rfkill ip_set sunrpc vfat fat joydev sg sch_fq_codel nfnetlink\nvirtio_gpu sr_mod cdrom drm_client_lib virtio_dma_buf drm_shmem_helper\ndrm_kms_helper drm ghash_ce backlight virtio_net virtio_blk virtio_scsi\nnet_failover virtio_console failover virtio_mmio dm_mirror\ndm_region_hash dm_log dm_multipath dm_mod fuse i2c_dev virtio_pci\nvirtio_pci_legacy_dev virtio_pci_modern_dev virtio virtio_ring autofs4\naes_neon_bs aes_ce_blk [último descargado: hwpoison_inject]\n[21630.909177] CPU: 3 UID: 0 PID: 3787 Comm: kylin-process-m Kdump:\ncargado Corrompido: G         W          6.18.0-rc1+ #74 PREEMPT(voluntary)\n[21630.910495] Corrompido: [W]=WARN\n[21630.910867] Nombre del hardware: QEMU KVM Máquina virtual, BIOS desconocido\n2/2/2022\n[21630.911625] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS\nBTYPE=--)\n[21630.912392] pc : __free_slab+0x228/0x250\n[21630.912868] lr : __free_slab+0x18c/0x250[21630.913334] sp :\nffff8000a02f73e0\n[21630.913830] x29: ffff8000a02f73e0 x28: fffffdffc43fc800 x27:\nffff0000c0011c40\n[21630.914677] x26: ffff0000c000cac0 x25: ffff00010fe5e5f0 x24:\nffff000102199b40\n[21630.915469] x23: 0000000000000003 x22: 0000000000000003 x21:\nffff0000c0011c40\n[21630.916259] x20: fffffdffc4086600 x19: fffffdffc43fc800 x18:\n0000000000000000\n[21630.917048] x17: 0000000000000000 x16: 0000000000000000 x15:\n0000000000000000\n[21630.917837] x14: 0000000000000000 x13: 0000000000000000 x12:\nffff70001405ee66\n[21630.918640] x11: 1ffff0001405ee65 x10: ffff70001405ee65 x9 :\nffff800080a295dc\n[21630.919442] x8 : ffff8000a02f7330 x7 : 0000000000000000 x6 :\n0000000000003000\n[21630.920232] x5 : 0000000024924925 x4 : 0000000000000001 x3 :\n0000000000000007\n[21630.921021] x2 : 0000000000001b40 x1 : 000000000000001f x0 :\n0000000000000001\n[21630.921810] Rastreo de llamadas:\n[21630.922130]   __free_slab+0x228/0x250 (P)\n[21630.922669]   free_slab+0x38/0x118\n[21630.923079]   free_to_partial_list+0x1d4/0x340\n[21630.923591]   __slab_free+0x24c/0x348\n[21630.924024]   ___cache_free+0xf0/0x110\n[21630.924468]   qlist_free_all+0x78/0x130\n[21630.924922]   kasan_quarantine_reduce+0x11\n---truncado---","source":"nvd"}],"published":"2025-12-16T13:48:27.813Z","modified":"2026-10-14T13:10:00.187Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"09c46563ff6d5f090211e48ff1fdba0ec7f4c97f","fixed":"fc6acd4cddf76e7eb7db63649fe36980ce208f56","status":"affected"},{"type":"git","introduced":"09c46563ff6d5f090211e48ff1fdba0ec7f4c97f","fixed":"3f56c407feb967e6faeb4e2e04eaa8edc206a686","status":"affected"},{"type":"git","introduced":"09c46563ff6d5f090211e48ff1fdba0ec7f4c97f","fixed":"1abbdf3d57aa964e572940d67c9ec5dc87710738","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.10","status":"unaffected"},{"type":"semver","introduced":"6.12.59","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.9","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/fc6acd4cddf76e7eb7db63649fe36980ce208f56","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3f56c407feb967e6faeb4e2e04eaa8edc206a686","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1abbdf3d57aa964e572940d67c9ec5dc87710738","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68199","url":"https://www.cve.org/CVERecord?id=CVE-2025-68199","licence":"CVE Terms of Use","modified":"2026-05-11T21:48:34.800Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68199","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68199","licence":"Public domain","modified":"2026-10-14T13:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:09.490Z","epss":{"score":0.00211,"percentile":0.12114,"date":"2026-12-01T12:00:22.000Z"}}