From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH] don't expect inode name to be NUL-terminated (avoid read overrun) Date: Tue, 14 Sep 2010 13:44:40 -0400 Message-ID: <4C8FB488.1050605@garzik.org> References: <874odxep0l.fsf@meyering.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=AkvEo2XleGZyWqW14vlC6aRwgwJ3QMRLWuqC3l/iWZ0=; b=hfEzNHi2cfs5h8Psu/SvnePZgX6CAp3IIyL/2UKbe6QgaTrwKj0/5DvJv/DfzwWrjM gDNAAr3IESVvJg/K97X9zRQy99sp9wzzJguo0CHMGg0yehOICHz6DL6WhzebuqIWGP/f cMpQG+BJ507clyOt6lbkV8Lxhq3hZwaCl4tzU= In-Reply-To: <874odxep0l.fsf@meyering.net> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Jim Meyering Cc: hail-devel@vger.kernel.org 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? Thanks, Jeff