Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hardening-v6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kernel hardening fixes from Kees Cook:

- Fix CFI hash randomization with KASAN (Sami Tolvanen)

- Check size of coreboot table entry and use flex-array

* tag 'hardening-v6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
kbuild: Fix CFI hash randomization with KASAN
firmware: coreboot: Check size of table entry and use flex-array

+10 -2
+7 -2
drivers/firmware/google/coreboot_table.c
··· 93 93 for (i = 0; i < header->table_entries; i++) { 94 94 entry = ptr_entry; 95 95 96 - device = kzalloc(sizeof(struct device) + entry->size, GFP_KERNEL); 96 + if (entry->size < sizeof(*entry)) { 97 + dev_warn(dev, "coreboot table entry too small!\n"); 98 + return -EINVAL; 99 + } 100 + 101 + device = kzalloc(sizeof(device->dev) + entry->size, GFP_KERNEL); 97 102 if (!device) 98 103 return -ENOMEM; 99 104 100 105 device->dev.parent = dev; 101 106 device->dev.bus = &coreboot_bus_type; 102 107 device->dev.release = coreboot_device_release; 103 - memcpy(&device->entry, ptr_entry, entry->size); 108 + memcpy(device->raw, ptr_entry, entry->size); 104 109 105 110 switch (device->entry.tag) { 106 111 case LB_TAG_CBMEM_ENTRY:
+1
drivers/firmware/google/coreboot_table.h
··· 79 79 struct lb_cbmem_ref cbmem_ref; 80 80 struct lb_cbmem_entry cbmem_entry; 81 81 struct lb_framebuffer framebuffer; 82 + DECLARE_FLEX_ARRAY(u8, raw); 82 83 }; 83 84 }; 84 85
+1
init/Makefile
··· 59 59 60 60 $(obj)/version-timestamp.o: include/generated/utsversion.h 61 61 CFLAGS_version-timestamp.o := -include include/generated/utsversion.h 62 + KASAN_SANITIZE_version-timestamp.o := n
+1
scripts/Makefile.vmlinux
··· 18 18 $(call if_changed_dep,cc_o_c) 19 19 20 20 ifdef CONFIG_MODULES 21 + KASAN_SANITIZE_.vmlinux.export.o := n 21 22 targets += .vmlinux.export.o 22 23 vmlinux: .vmlinux.export.o 23 24 endif