{"id":"DEBIAN-CVE-2024-56628","details":"In the Linux kernel, the following vulnerability has been resolved:  LoongArch: Add architecture specific huge_pte_clear()  When executing mm selftests run_vmtests.sh, there is such an error:   BUG: Bad page state in process uffd-unit-tests  pfn:00000  page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x0  flags: 0xffff0000002000(reserved|node=0|zone=0|lastcpupid=0xffff)  raw: 00ffff0000002000 ffffbf0000000008 ffffbf0000000008 0000000000000000  raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000  page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set  Modules linked in: snd_seq_dummy snd_seq snd_seq_device rfkill vfat fat     virtio_balloon efi_pstore virtio_net pstore net_failover failover fuse     nfnetlink virtio_scsi virtio_gpu virtio_dma_buf dm_multipath efivarfs  CPU: 2 UID: 0 PID: 1913 Comm: uffd-unit-tests Not tainted 6.12.0 #184  Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022  Stack : 900000047c8ac000 0000000000000000 9000000000223a7c 900000047c8ac000          900000047c8af690 900000047c8af698 0000000000000000 900000047c8af7d8          900000047c8af7d0 900000047c8af7d0 900000047c8af5b0 0000000000000001          0000000000000001 900000047c8af698 10b3c7d53da40d26 0000010000000000          0000000000000022 0000000fffffffff fffffffffe000000 ffff800000000000          000000000000002f 0000800000000000 000000017a6d4000 90000000028f8940          0000000000000000 0000000000000000 90000000025aa5e0 9000000002905000          0000000000000000 90000000028f8940 ffff800000000000 0000000000000000          0000000000000000 0000000000000000 9000000000223a94 000000012001839c          00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d          ...  Call Trace:  [\u003c9000000000223a94\u003e] show_stack+0x5c/0x180  [\u003c9000000001c3fd64\u003e] dump_stack_lvl+0x6c/0xa0  [\u003c900000000056aa08\u003e] bad_page+0x1a0/0x1f0  [\u003c9000000000574978\u003e] free_unref_folios+0xbf0/0xd20  [\u003c90000000004e65cc\u003e] folios_put_refs+0x1a4/0x2b8  [\u003c9000000000599a0c\u003e] free_pages_and_swap_cache+0x164/0x260  [\u003c9000000000547698\u003e] tlb_batch_pages_flush+0xa8/0x1c0  [\u003c9000000000547f30\u003e] tlb_finish_mmu+0xa8/0x218  [\u003c9000000000543cb8\u003e] exit_mmap+0x1a0/0x360  [\u003c9000000000247658\u003e] __mmput+0x78/0x200  [\u003c900000000025583c\u003e] do_exit+0x43c/0xde8  [\u003c9000000000256490\u003e] do_group_exit+0x68/0x110  [\u003c9000000000256554\u003e] sys_exit_group+0x1c/0x20  [\u003c9000000001c413b4\u003e] do_syscall+0x94/0x130  [\u003c90000000002216d8\u003e] handle_syscall+0xb8/0x158  Disabling lock debugging due to kernel taint  BUG: non-zero pgtables_bytes on freeing mm: -16384  On LoongArch system, invalid huge pte entry should be invalid_pte_table or a single _PAGE_HUGE bit rather than a zero value. And it should be the same with invalid pmd entry, since pmd_none() is called by function free_pgd_range() and pmd_none() return 0 by huge_pte_clear(). So single _PAGE_HUGE bit is also treated as a valid pte table and free_pte_range() will be called in free_pmd_range().    free_pmd_range()         pmd = pmd_offset(pud, addr);         do {                 next = pmd_addr_end(addr, end);                 if (pmd_none_or_clear_bad(pmd))                         continue;                 free_pte_range(tlb, pmd, addr);         } while (pmd++, addr = next, addr != end);  Here invalid_pte_table is used for both invalid huge pte entry and pmd entry.","modified":"2026-09-15T09:03:17.009899477Z","published":"2024-12-27T15:15:22.357Z","upstream":["CVE-2024-56628"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2024-56628"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.123-1"}]}],"versions":["6.1.106-1","6.1.106-2","6.1.106-3","6.1.112-1","6.1.115-1","6.1.119-1","6.1.27-1","6.1.37-1","6.1.38-1","6.1.38-2","6.1.38-2~bpo11+1","6.1.38-3","6.1.38-4","6.1.38-4~bpo11+1","6.1.52-1","6.1.55-1","6.1.55-1~bpo11+1","6.1.64-1","6.1.66-1","6.1.67-1","6.1.69-1","6.1.69-1~bpo11+1","6.1.76-1","6.1.76-1~bpo11+1","6.1.82-1","6.1.85-1","6.1.90-1","6.1.90-1~bpo11+1","6.1.94-1","6.1.94-1~bpo11+1","6.1.98-1","6.1.99-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-56628.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.12.5-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-56628.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.12.5-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-56628.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}