Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=666ab414fe14e8bbbe86a110437346128e1ec869
Commit:     666ab414fe14e8bbbe86a110437346128e1ec869
Parent:     58b7a68de37face98afe7c705391145795a982b5
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 22 03:43:10 2007 +0100
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 23:14:36 2008 +0100

    kbuild: fix a buffer overflow in modpost
    
    When passing an file name > 1k the stack could be overflowed.
    Not really a security issue, but still better plugged.
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/mod/modpost.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 404ee0d..4d1c590 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1656,7 +1656,6 @@ int main(int argc, char **argv)
 {
        struct module *mod;
        struct buffer buf = { };
-       char fname[SZ];
        char *kernel_read = NULL, *module_read = NULL;
        char *dump_write = NULL;
        int opt;
@@ -1709,6 +1708,8 @@ int main(int argc, char **argv)
        err = 0;
 
        for (mod = modules; mod; mod = mod->next) {
+               char fname[strlen(mod->name) + 10];
+
                if (mod->skip)
                        continue;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to