NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/42303: cgd(4) breaks SSP builds



>Number:         42303
>Category:       kern
>Synopsis:       cgd(4) breaks SSP builds
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 10 17:00:00 +0000 2009
>Originator:     Matthias Scheler
>Release:        NetBSD 5.99.22 2009-11-10 sources
>Organization:
Matthias Scheler                                  http://zhadum.org.uk/
>Environment:
System: NetBSD colwyn.zhadum.org.uk 5.0_STABLE NetBSD 5.0_STABLE (COLWYN.64) 
#1: Tue Nov 10 09:16:08 GMT 2009 
tron%colwyn.zhadum.org.uk@localhost:/src/sys/compile/COLWYN.64 amd64
Architecture: x86_64
Machine: amd64

[This is the build system not the actual release which the bug is about.]

>Description:
The cgd(4) driver allocates dynamic sized buffers on the stack:

static void
cgd_cipher(struct cgd_softc *cs, void *dstv, void *srcv,
    size_t len, daddr_t blkno, size_t secsize, int dir)
{
[...]
        size_t          blocksize = cs->sc_cdata.cf_blocksize;
        char            sink[blocksize];
        char            zero_iv[blocksize];
        char            blkno_buf[blocksize];
[...]
}

This breaks builds with SSP (Stack Smash Protection) enabled because
"gcc" complains that it cannot provide SSP for this function.

>How-To-Repeat:
./build.sh -V USE_SSP=YES tools kernel=GENERIC

>Fix:
None provided.



Home | Main Index | Thread Index | Old Index