mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Peter Oberparleiter <oberpapr@softhome.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] 2.4.18/2.5.24 kernel/module.c - minor bugs
Date: Mon, 08 Jul 2002 20:59:37 +1000	[thread overview]
Message-ID: <17075.1026125977@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Mon, 08 Jul 2002 10:27:50 +0200." <200207080828.g688Sdo51968@d06relay02.portsmouth.uk.ibm.com>

On Mon, 8 Jul 2002 10:27:50 +0200, 
Peter Oberparleiter <oberpapr@softhome.net> wrote:
>this patch fixes two minor bugs in kernel/module.c in current linux
>kernel versions (2.4.18/2.5.24) which could cause problems in some
>rare situations:
>1. A size-check in sys_create_module is off by one. The check reads
>2. In case "struct module" used by insmod is larger than the one used
>by the kernel (e.g. newer version), module loading will fail.

Looks good.  Linus/Marcelo, please apply.

========================================
--- linux-2.4.17/kernel/module.c	Sun Nov 11 20:23:14 2001
+++ linux-2.4.17-modfix/kernel/module.c	Mon Jul  8 09:50:57 2002
@@ -303,7 +303,7 @@
 		error = namelen;
 		goto err0;
 	}
-	if (size < sizeof(struct module)+namelen) {
+	if (size < sizeof(struct module)+namelen+1) {
 		error = -EINVAL;
 		goto err1;
 	}
@@ -482,10 +482,10 @@
 		error = n_namelen;
 		goto err2;
 	}
-	if (namelen != n_namelen || strcmp(n_name, mod_tmp.name) != 0) {
+	if (namelen != n_namelen || strcmp(n_name, name_tmp) != 0) {
 		printk(KERN_ERR "init_module: changed module name to "
 				"`%s' from `%s'\n",
-		       n_name, mod_tmp.name);
+		       n_name, name_tmp);
 		goto err3;
 	}
 
========================================


>Regards,
>  Peter Oberparleiter


      reply	other threads:[~2002-07-08 10:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08  8:27 Peter Oberparleiter
2002-07-08 10:59 ` Keith Owens [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17075.1026125977@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oberpapr@softhome.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®