From nobody Fri Jul 18 22:44:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bkPxV69V4z61vP9; Fri, 18 Jul 2025 22:44:46 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bkPxV3p5Mz3t4K; Fri, 18 Jul 2025 22:44:46 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-aec5a714ae9so283382166b.3; Fri, 18 Jul 2025 15:44:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752878685; x=1753483485; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O/YkYOqurgHWqIPii4JdACzUcgMTTCCRgMSPqUqdTy4=; b=eA4siLVExrffFa6aWs+qJLLajMGrIrnW+szt8bmzzEzUl1GIxPL8dq49UyMUCoa0sQ iPaBw7vTgW/XxZJ4u1hbECAXbicZ1NYi7t4Ux8mMlmii5JJX/yx34ljS2UrMUlYFAqez yLeKFbtMpoRapRyrrj1LU0Al/9ZMj3anlR6u4X6QKnQ2sD5VbgSZ34bwBOda1QwQTaHz 3CrxmuK0ELVY64goAA2iRt6L3IdP4pmM5vqsa81s9EmCYaWO9t2nKNa5dEm6voNox8g+ AlImrJ/XEmIcxZsvTiXpKzB0rex1e4RjPcnaLHAwOWqoNwDKsgfKxb29uY/0/ZikR0Ey MR5Q== X-Forwarded-Encrypted: i=1; AJvYcCUcNIIYtyH7BdxcOMN3yyRewgivfSUTCjyHOyQnJM/gN+e/k35DpO4uRU4nDRcKiB/23gWyr+HhtNyClWuaQBd3Vcsc@freebsd.org, AJvYcCVFok6hCDMGILpGy7t/i6/56PjdcvhGOqKp0m7GsCRWmocVsQrIxboQQeSBY/vmyEMz9pwa1wIni7FwZKAotlUzj4hoRPw=@freebsd.org X-Gm-Message-State: AOJu0Yy9DLytpQN2K/+zawlnsblwz8JnSx5gBuIs7hGvKuiFOwVLSrAF I9hs9llflD4GLp1gSSCprIqmY7F6vfCTTI0quUEkvHcPeDcQjK3c8DjKpCJWlvlIPuZ1DDs1sLQ BGyVvsgYnhw1DlMUirCY4VKttdd1K9gs= X-Gm-Gg: ASbGncs9ltzAgt27OP9M2KUtGO/B+rzxpQ7wq/tHHTK08ywAYjgSo54zACFt22gHfpe +SOLL57xor3XIf7QuhzETaAlgdnP2IDngFS/FcxiQySbhiKXrF04SBPqhFx0gTlxn9sQWaKJOB1 vsJiLaOA3q8ciwDI6PdAQ3d8rZY3r/AlU6btpIN3gafMokOLIrmKG4AMBEiZzE6Lytih2UnvRxd 5U2IBM= X-Google-Smtp-Source: AGHT+IFkFrSdbl1ZhAm2S7VUeYe5a1NC3m69sJH7nez6uoKcMTdKKaOLTE9AVJaFpVeo3EwikUDerwdfjKEScveRz2U= X-Received: by 2002:a17:907:2d94:b0:ae0:de30:8569 with SMTP id a640c23a62f3a-ae9c99442c6mr1256374866b.1.1752878684423; Fri, 18 Jul 2025 15:44:44 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202507172154.56HLsGLL095197@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Fri, 18 Jul 2025 16:44:32 -0600 X-Gm-Features: Ac12FXyY5O1eEQepiloUTOL3V6vuBCriAy580KvuGJ-nHffKAM0fVIzB8xjsUFs Message-ID: Subject: Re: git: 29af6d2e2ec9 - main - msdosfs: replace '/' in direntries with '?' To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000051ccd7063a3bdf78" X-Rspamd-Queue-Id: 4bkPxV3p5Mz3t4K X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] --00000000000051ccd7063a3bdf78 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 18, 2025 at 4:42=E2=80=AFPM Konstantin Belousov wrote: > On Fri, Jul 18, 2025 at 10:06:56AM -0600, Alan Somers wrote: > > Should we move this logic up into kern_getdirentries? msdosfs is not t= he > > only file system vulnerable to this problem. > It is relatively hard to do in kern_getdirentries(), and perhaps would > cause a severe performance hit for filesystems that do not need it. > > The issue is that uio might be for UIO_USERSPACE (and less likely > UIO_NOCOPY). > So we must allocate the transient buffer, then call VOP_READDIR() for tha= t > buffer, then do the validation, and then copyout to the final uio. > > Another thing, there are more VOP_READDIR() uses than only > kern_getdirents(). > Worst part, we do trust UFS and ZFS which are the most perf-sensitive. > > I did looked at generic checker, might be guided by some MNTK_-level flag= , > but decided to just patch msdosfs. > > That explanation makes sense. I guess I need to patch fusefs, too. We definitely don't want to trust that one. --00000000000051ccd7063a3bdf78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jul 18, 2025 at 4:42=E2=80=AFPM Konst= antin Belousov <kostikbel@gmail.c= om> wrote: