File: module-disable-matching-missing-version-crc.patch

package info (click to toggle)
linux 6.1.159-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,495,620 kB
  • sloc: ansic: 23,458,997; asm: 266,680; sh: 110,635; makefile: 49,889; python: 36,941; perl: 36,837; cpp: 6,055; yacc: 4,908; lex: 2,725; awk: 1,440; ruby: 25; sed: 5
file content (23 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (27)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 02 Dec 2016 23:06:18 +0000
Subject: module: Disable matching missing version CRC
Forwarded: not-needed

This partly reverts commit cd3caefb4663e3811d37cc2afad3cce642d60061.
We want to fail closed if a symbol version CRC is missing, as the
alternative may allow subverting module signing.
---
--- a/kernel/module/version.c
+++ b/kernel/module/version.c
@@ -46,9 +46,8 @@ int check_version(const struct load_info
 		goto bad_version;
 	}
 
-	/* Broken toolchain. Warn once, then let it go.. */
-	pr_warn_once("%s: no symbol version for %s\n", info->name, symname);
-	return 1;
+	pr_warn("%s: no symbol version for %s\n", info->name, symname);
+	return 0;
 
 bad_version:
 	pr_warn("%s: disagrees about version of symbol %s\n", info->name, symname);