From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 662DBC35241 for ; Sat, 25 Jan 2020 06:43:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 37B6E2071E for ; Sat, 25 Jan 2020 06:43:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725887AbgAYGnw (ORCPT ); Sat, 25 Jan 2020 01:43:52 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:44433 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725781AbgAYGnw (ORCPT ); Sat, 25 Jan 2020 01:43:52 -0500 Received: from callcc.thunk.org (rrcs-67-53-201-206.west.biz.rr.com [67.53.201.206]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 00P6hjR9017900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 25 Jan 2020 01:43:47 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 3CEFB42014A; Sat, 25 Jan 2020 01:43:44 -0500 (EST) Date: Sat, 25 Jan 2020 01:43:44 -0500 From: "Theodore Y. Ts'o" To: Andreas Dilger Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/2] mmp: don't assume NUL termination for MMP strings Message-ID: <20200125064344.GA1108497@mit.edu> References: <20191231220724.GA118765@mit.edu> <1579038138-49231-1-git-send-email-adilger@dilger.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579038138-49231-1-git-send-email-adilger@dilger.ca> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Jan 14, 2020 at 02:42:17PM -0700, Andreas Dilger wrote: > Don't assume that mmp_nodename and mmp_bdevname are NUL terminated, > since very long node/device names may completely fill the buffers. > > Limit string printing to the maximum buffer size for safety, and > change the field definitions to __u8 to make it more clear that > they are not NUL-terminated strings, as is done with other strings > in the superblock that do not have NUL termination. > > Signed-off-by: Andreas Dilger Applied, thanks. - Ted