lkml.org 
[lkml]   [2006]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[Patch 5 of 8] Add the __stack_chk_fail() function
    From
    Date
    GCC emits a call to a __stack_chk_fail() function when the cookie is not 
    matching the expected value. Since this is a bad security issue; lets panic
    the kernel

    Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

    ---
    kernel/panic.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    Index: linux-2.6.16-rc6-stack-protector/kernel/panic.c
    ===================================================================
    --- linux-2.6.16-rc6-stack-protector.orig/kernel/panic.c
    +++ linux-2.6.16-rc6-stack-protector/kernel/panic.c
    @@ -174,3 +174,11 @@ void add_taint(unsigned flag)
    tainted |= flag;
    }
    EXPORT_SYMBOL(add_taint);
    +
    +#ifdef CONFIG_STACK_PROTECTOR
    +void __stack_chk_fail(void)
    +{
    + panic("stack-protector: Stack is corrupted\n");
    +}
    +EXPORT_SYMBOL(__stack_chk_fail);
    +#endif
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-03-17 17:20    [W:0.020 / U:1.964 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site