Date: Sat, 09 Feb 2013 19:04:32 +0400 From: Andrey Zonov <zont@FreeBSD.org> To: Fabian Keil <freebsd-listen@fabiankeil.de> Cc: Eitan Adler <lists@eitanadler.com>, current@freebsd.org, Andriy Gapon <avg@freebsd.org> Subject: Re: geli(8) breaks after a couple hours of uptime Message-ID: <51166580.4080603@FreeBSD.org> In-Reply-To: <20130209140733.0b753c60@fabiankeil.de> References: <20130207141833.GA15884@acme.spoerlein.net> <20130207153322.5c371beb@fabiankeil.de> <20130207180153.GX35868@acme.spoerlein.net> <20130208095709.6ae61cff@fabiankeil.de> <20130208114825.GY35868@acme.spoerlein.net> <5114F390.4010302@FreeBSD.org> <CAF6rxgn7PRmBkx3FLnXfOjKzSHi1JEQQ_wc4273oHCmpTCjR1A@mail.gmail.com> <20130209140733.0b753c60@fabiankeil.de>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJRFmWEAAoJEBWLemxX/CvTqykIAKS9djh3rFeDUNCHiOZNh9g/ Qfvmb62qYujYIO1dTdgsTi1zG7x56TftEV8rXktKcoVTWyNUEZ1BlmiBtv8YWJEW HFVCBBISzSgxtJw5j4c5CqwcE0IgJjSMLO7I61jJ46BcOtgc8VJsSieKVQnhYnEe 3CTGHK277UuwrGHvBirTMHpE49j14bu0cnPPROUFbxhhQSjWi+LFG5LzTbV8OJzY CtWd15xw/6dNLZKaltwxZH45vwNim/vNqilTG20R2cCwid7VpzhkiUuqAsxFXdA9 eSIm3uCgBJtDLCuNdkN8SclxkStSmbT0mfYD+FGKMO5+GrF56I13NFtYn/MJhiM= =C4e8 -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51166580.4080603>
