# [SOLVED] net/ipv4/raw.o copy_to_user()

## olivia.wilde

I have this error when building my kernel.

```

  CHK     include/linux/version.h

  CHK     include/generated/utsrelease.h

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

# @-chmod -f 500 /boot

# @-chmod -f 500 /lib/modules

# @-chmod -f 700 .

# @echo '  grsec: protected kernel image paths'

  CC      net/ipv4/raw.o

In file included from /usr/src/linux-2.6.38-hardened-r6/arch/x86/include/asm/uaccess.h:633,

                 from net/ipv4/raw.c:44:

In function 'copy_to_user',

    inlined from 'raw_getsockopt' at net/ipv4/raw.c:752:

/usr/src/linux-2.6.38-hardened-r6/arch/x86/include/asm/uaccess_32.h:249: error: call to 'copy_to_user_overflow' declared with attribute error: copy_to_user() buffer size is not provably correct

At top level:

cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"

make[2]: *** [net/ipv4/raw.o] Error 1

make[1]: *** [net/ipv4] Error 2

make: *** [net] Error 2

make: *** Waiting for unfinished jobs....

```

Last edited by olivia.wilde on Sun Jul 10, 2011 5:27 am; edited 1 time in total

----------

## Hu

A call site is written to do a transfer that the compiler cannot prove will not overflow.  You could disable this security check, disable compilation of the affected file, or file a bug.  You could also try using a newer compiler, in case a later version is more clever about deducing the sizes involved.

----------

## olivia.wilde

Thanks, I've disable kernel debugging and it works.

----------

