Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp19396lqs; Mon, 4 Mar 2024 13:31:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUHadY6SqFnCPST1f1mx5I/HW1f7uoxKFI/+ROgPrqbXwOnPXz6HgRm4J1T9W4aoPFE4W6Spd06sTVHCoeH4oK99ydH1vOwRxFsgEfSmw== X-Google-Smtp-Source: AGHT+IFlnFHsbNrSthyBug/pMrV0u3oeQjfdpHM/ZZk4k4k/MA0dvBGGiIFmMMRcHlZwpXEPmGgH X-Received: by 2002:a05:6a20:8f22:b0:1a1:4d85:5d73 with SMTP id b34-20020a056a208f2200b001a14d855d73mr7311724pzk.25.1709587890789; Mon, 04 Mar 2024 13:31:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709587890; cv=pass; d=google.com; s=arc-20160816; b=ipWN08Iuvj3tzbK4nIKiBJ+b/Uu6sRJotiivX8JOw221YPrrzWfmpEOFDLzB9PONku BpTnUkCv38XPzRiE/Yy9reOSKrs5iNG3SumLupQgpNnBaIa8FSoucQ39PEkgayW4Y+W3 lq3b1fzjC7ShAOgHD7C9CBUh0QWdeCoh/UBAYvLzvUM6kwl3vSrGJE7LMWc9dMkdnq71 0YNPib3OaV+hrUHGBCmIjiX+Ug0nUI1FtntNHwSHfBXdhPRZBTx4s9F4muDG16jROKRY GZLhcvogTj46TpXo4kOTRHN4eKAvlCxRkPJuNAK0Xrlnr8+Mn7unIYL0xa6qj3xZAAwf ftvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter; bh=nvSvmkdYAiWxaqGPMtppRIO/kU85atmGqBYFjnB7fj4=; fh=54RoTH6yOvrwkpFOwrIZITbLuVO3o3C5vRuvUIUcuJQ=; b=gxFuVuXZFdgJ4fCAo/El9G3NdylvF/7pStZ75xrKJZmQ9U234WiuIzlFl3vBMMErdi 4oEMjXhojrWu8mP3BprP1pg0CRKNo2p2v171FLbbsR2WCH5HJewyhS53A/fNpMVw6gge wSL2L45qh6MhYgyTNntBTEAob5rrEGMVJrkmv1DQdu1sWF7DXNfE47ebBUu0wsFoH30v CJN7hCcvmXto3MCRSPJZYISHD8kd4YJ0/haZE1O6qMvHKIShLYS64k3y1s8+phYV4fYh euuNaIDc/1NCDAhKDPYpGq7PONONUbBXRcBYoHXlTAxiCR6fPkiKVJdMOprBQ77+CBvs NSLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b="g/ArLPpg"; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-91284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bq19-20020a056a02045300b005dc8587419esi9620386pgb.421.2024.03.04.13.31.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 13:31:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b="g/ArLPpg"; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-91284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 568B7B211B1 for ; Mon, 4 Mar 2024 21:20:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51B67200CD; Mon, 4 Mar 2024 21:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="g/ArLPpg" Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B359EED3 for ; Mon, 4 Mar 2024 21:19:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709587192; cv=none; b=bNeCqo4cG+gwxdgv5RujeHvj3ibYwMlm/KOZl788J8QxbJ1EFVdCtlMDOQQkORTIr6HlACPe+NYmh1VHoqhB5FQT/q6Zd2r7We/zYT3GLwoN7RCoP+y/mJLtwWlVNG+dDqf5gH1X7IgR/vFMQ1EI4twhAr9ZWdxtobfVPEnkA1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709587192; c=relaxed/simple; bh=EyCnhyZx8y61GIK+e1cgky+PPZbRfpMMnKuKuP3ADVg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=P+6D/l1mW+4ObN6rzoUyG3YJx5/kWtc8FLP8n200gtRjg+2OfnN1ypcrrkz3KDCCFNCK2f3AXU36CKafxYCyFU2eWR5tBRXbwrqlzTMgDmLMst1m/VoF2qeMBZ576zbD0pP2Q3/ipWIOXtXd4A+ApyCIBBxXq1mblryDYjejNdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=g/ArLPpg; arc=none smtp.client-ip=83.149.199.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru Received: from localhost (unknown [10.10.165.17]) by mail.ispras.ru (Postfix) with ESMTPSA id 7864E40F1DDF; Mon, 4 Mar 2024 21:19:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 7864E40F1DDF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1709587186; bh=nvSvmkdYAiWxaqGPMtppRIO/kU85atmGqBYFjnB7fj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g/ArLPpgS24z1ofyCdO3tL69gg5RqObbiWy0rskesljj7t7SNN/fjJR6j25jYaZUm od9ktWV0aE1olE7EFv6RH/qYZnwNZqvW824QFeP5ieO51nvO9wiO9Aiap7FBGyqykQ NAHs3jdXyZk4tXt0qOLxSLEAH6DmM5mEmOmdNofg= Date: Tue, 5 Mar 2024 00:19:45 +0300 From: Fedor Pchelkin To: Dominique Martinet Cc: Christian Schoenebeck , Eric Van Hensbergen , Latchesar Ionkov , Venkateswararao Jujjuri , "Aneesh Kumar K.V" , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, Alexey Khoroshilov , lvc-project@linuxtesting.org, syzbot+56fdf7f6291d819b9b19@syzkaller.appspotmail.com, syzbot+a83dc51a78f0f4cf20da@syzkaller.appspotmail.com, Pavel Skripkin Subject: Re: Re: [PATCH] fs: 9p: avoid warning during xattr allocation Message-ID: <7096c0ab-e2ee-4aa9-bb05-0667efa85fd1-pchelkin@ispras.ru> References: <20240202121319.21743-1-pchelkin@ispras.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On 24/03/04 10:09PM, Dominique Martinet wrote: > Fedor Pchelkin wrote on Fri, Feb 02, 2024 at 03:13:17PM +0300: > > An invalid server may reply with an xattr size which still fits into > > ssize_t but is large enough to cause splat during kzalloc(). > > > Ah, sorry for not replying to this earlier.. and I had forgotten about > it when something similar came up just now. > > I've submitted a patch to limit such allocations to 64k: > https://lkml.kernel.org/r/20240304-xattr_maxsize-v1-1-322357ec6bdf@codewreck.org > > Would you agree this makes this patch obsolete? Yes, thanks! Checking against the VFS limits is more appropriate. > > I'll go ahead and add the reported-by/closes you cited in this mail to > my commit. Okay. -- Fedor