# Buffer size is not provably correct

## evoweiss

Hi,

I just tried to recompile my kernel and received the following error. I also cannot seem to boot from this version of the kernel. Does anybody know what is going on and how to solve this?

```

In file included from /usr/src/linux-3.8.13-gentoo/arch/x86/include/asm/uaccess.h:550:0,

                 from include/linux/uaccess.h:5,

                 from include/linux/highmem.h:8,

                 from include/linux/pagemap.h:10,

                 from fs/binfmt_misc.c:27:

/usr/src/linux-3.8.13-gentoo/arch/x86/include/asm/uaccess_32.h: In function ‘parse_command.part.5’:

/usr/src/linux-3.8.13-gentoo/arch/x86/include/asm/uaccess_32.h:211:26: warning: call to ‘copy_from_user_overflow’ declared with attribute warning: copy_from_user() buffer size is not provably correct [enabled by default]

```

Best,

Alex

----------

## Hu

The kernel code accesses user memory in a way that the compiler cannot guarantee will be safe.  This may be due to a limitation in the optimizer or it may be a real bug.  It is probably not directly responsible for your inability to boot that kernel.  We cannot debug the boot failure with the limited information you have given us.

----------

## eccerr0r

Neat, it looks like this warning was emitted from the code itself.  Likely there may be a bug in binfmt_misc that could cause a buffer overflow, but this should not be the reason why your kernel can't boot.  Need more diagnostic information indeed.

As for the buffer overflow, I think binfmt_misc changes requires root anyway so it's not too serious except it may be possible to crash the system by sending random stuff into there...  but again root is needed to write this so...

----------

## evoweiss

Hi all,

It appears as if the failure to boot was because, for some reason, the flag for the file system was switched off. I am not sure why that happened to my .config file.

Also, thanks for the information about binfmt and what that means. Is it a kernel bug or something to do with my system set up, hardware, etc.?

Best,

Alex

----------

## eccerr0r

binfmt_misc is used to make the kernel detect binary formats and run them in a way the user wants.

The key use of this is to make the kernel automatically detect windows binaries and run wine on them, automatically.  You can also use this to automatically run non-native binaries through an emulator, but you still have to watch out for library locations.

----------

