Re: geli(8) breaks after a couple hours of uptime

From: Andrey Zonov <zont_at_FreeBSD.org>
Date: Sat, 09 Feb 2013 19:04:32 +0400
On 2/9/13 5:07 PM, Fabian Keil wrote:
> 
> This would at least prevent the segfault.
> 

I see two possibilities to get segfault:
  - no checking for result from memory allocation functions
  - too big stack

I have no found any broken memory allocation checking, but I found two
big objects on the stack.  One is buf[MAXPHYS] in eli_genkey_files() and
another is passbuf[MAXPHYS] in eli_genkey_passphrase().  If we change
these two to malloc(), then we can handle error from malloc(), print
some useful message and prevent segfault.

-- 
Andrey Zonov


Received on Sat Feb 09 2013 - 14:04:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:34 UTC