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
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2JIFTPCALEFSATLEMVGHW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2/9/13 5:07 PM, Fabian Keil wrote: >=20 > This would at least prevent the segfault. >=20 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. --=20 Andrey Zonov ------enig2JIFTPCALEFSATLEMVGHW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----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----- ------enig2JIFTPCALEFSATLEMVGHW--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51166580.4080603>