lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Oct 2012 12:35:53 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Howells <dhowells@...hat.com>,
	Linus <torvalds@...ux-foundation.org>,
	Kees Cook <keescook@...omium.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: linux-next: manual merge of the modules tree with the  tree

Hi Rusty,

Today's linux-next merge of the modules tree got a conflict in
kernel/module.c between commit caabe240574a ("MODSIGN: Move the magic
string to the end of a module and eliminate the search") from Linus' tree
and commit 0250abdeec54 ("module: add syscall to load module from fd")
from the modules tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

I do wonder why the above change in Linus' tree seems to have bypassed
the modules maintainer.

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc kernel/module.c
index 6085f5e,261bf82..0000000
--- a/kernel/module.c
+++ b/kernel/module.c
@@@ -2420,18 -2422,27 +2422,18 @@@ static inline void kmemleak_load_module
  #endif
  
  #ifdef CONFIG_MODULE_SIG
- static int module_sig_check(struct load_info *info,
- 			    const void *mod, unsigned long *_len)
+ static int module_sig_check(struct load_info *info)
  {
  	int err = -ENOKEY;
- 	unsigned long markerlen = sizeof(MODULE_SIG_STRING) - 1;
- 	unsigned long len = *_len;
+ 	const unsigned long markerlen = sizeof(MODULE_SIG_STRING) - 1;
+ 	const void *mod = info->hdr;
 -	const void *p = mod, *end = mod + info->len;
++	unsigned long len = info->len;
  
 -	/* Poor man's memmem. */
 -	while ((p = memchr(p, MODULE_SIG_STRING[0], end - p))) {
 -		if (p + markerlen > end)
 -			break;
 -
 -		if (memcmp(p, MODULE_SIG_STRING, markerlen) == 0) {
 -			const void *sig = p + markerlen;
 -			/* Truncate module up to signature. */
 -			info->len = p - mod;
 -			err = mod_verify_sig(mod, info->len,
 -					     sig, end - sig);
 -			break;
 -		}
 -		p++;
 +	if (len > markerlen &&
 +	    memcmp(mod + len - markerlen, MODULE_SIG_STRING, markerlen) == 0) {
 +		/* We truncate the module to discard the signature */
- 		*_len -= markerlen;
- 		err = mod_verify_sig(mod, _len);
++		info->len -= markerlen;
++		err = mod_verify_sig(mod, &info->len);
  	}
  
  	if (!err) {

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ