From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Meyering Subject: Re: [PATCH] don't expect inode name to be NUL-terminated (avoid read overrun) Date: Wed, 15 Sep 2010 10:15:13 +0200 Message-ID: <874odr2zji.fsf@meyering.net> References: <874odxep0l.fsf@meyering.net> <4C8FB488.1050605@garzik.org> Mime-Version: 1.0 Return-path: In-Reply-To: <4C8FB488.1050605@garzik.org> (Jeff Garzik's message of "Tue, 14 Sep 2010 13:44:40 -0400") Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jeff Garzik Cc: hail-devel@vger.kernel.org Jeff Garzik wrote: > On 09/10/2010 08:55 AM, Jim Meyering wrote: >> >> * server/msg.c (msg_get): Copy only name_len bytes, then NUL-terminate, >> rather than using snprintf to copy up to and including nonexistent NUL. >> --- >> >> valgrind exposed this. The use of snprintf would have been >> correct if the inode name buffer (following the struct raw_inode) >> were NUL-terminated, but it is not. > > applied -- good catch > > out of curiosity, what is your patch base? > > We combined cld and chunkd into a single 'hail' pkg, and from the > pathname, your patch was generated from the older cld pkg. We'd like > to find the source and replace cld/chunkd with 'hail'. > > F12? F13? rawhide? Hi Jeff, I was using the sources from here: git://git.kernel.org/pub/scm/daemon/cld/cld.git >From your comment there must be a hail git repository. Found it: http://git.kernel.org/?p=daemon/distsrv/hail.git;a=summary FYI, when I searched for hail's git repository initially, https://hail.wiki.kernel.org/ was inaccessible, so I found the above in a presumably-old cache.