Unverified Commit b42fa7bc authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9761 CVE-2024-26816

Merge Pull Request from: @ci-robot 
 
PR sync from: liwei <liwei728@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/4XCMOHUSSR5ER5VXWBT4GIBXHW4YYUL6/ 
CVE-2024-26816

Guixiong Wei (1):
  x86/boot: Ignore relocations in .notes sections in walk_relocs() too

Kees Cook (1):
  x86, relocs: Ignore relocations in .notes section


-- 
2.25.1
 
https://gitee.com/src-openeuler/kernel/issues/I9FNFG 
 
Link:https://gitee.com/openeuler/kernel/pulls/9761

 

Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 3ac48abd 8b155025
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -596,6 +596,14 @@ static void print_absolute_relocs(void)
		if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
			continue;
		}
		/*
		 * Do not perform relocations in .notes section; any
		 * values there are meant for pre-boot consumption (e.g.
		 * startup_xen).
		 */
		if (sec_applies->shdr.sh_type == SHT_NOTE) {
			continue;
		}
		sh_symtab  = sec_symtab->symtab;
		sym_strtab = sec_symtab->link->strtab;
		for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
@@ -681,6 +689,15 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
		if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
			continue;
		}

		/*
		 * Do not perform relocations in .notes sections; any
		 * values there are meant for pre-boot consumption (e.g.
		 * startup_xen).
		 */
		if (sec_applies->shdr.sh_type == SHT_NOTE)
			continue;

		sh_symtab = sec_symtab->symtab;
		sym_strtab = sec_symtab->link->strtab;
		for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {