From patchwork Thu Sep 26 16:40:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ghadi Elie Rahme X-Patchwork-Id: 1989888 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XDzsL64pKz1xtB for ; Fri, 27 Sep 2024 02:42:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1strZ5-00039k-Pa; Thu, 26 Sep 2024 16:42:03 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1strZ2-00038e-3s for kernel-team@lists.ubuntu.com; Thu, 26 Sep 2024 16:42:00 +0000 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id AB4C43F277 for ; Thu, 26 Sep 2024 16:41:57 +0000 (UTC) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37cd32f9c59so199156f8f.1 for ; Thu, 26 Sep 2024 09:41:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727368917; x=1727973717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rNEg+4Cqpff57wjTVdmOyuuaCAyJOjsIr7Va2x4G1Cc=; b=q33AnuNlOLhUYJXhF3gI4BxoHG8fa+h2+zTZo8v+uDRxRb4H8IEW0F/6Qn0E4jTPZt QeU7QyAJjd/3YzsZCPsVZVN8RPOvFMITugiQlJOJX/OToq2EdIn41YHyCj6bt0pdgbqs PI2oPGllsJzEhqlQ5Oc97xn5xP35sX7ERm+7oJovjWPIOlk5enILYOc1U67TvnpsA2Ip tOgZe4wSJ34DSmv/uAbVOlzuohtNs+UY+MwGO3Wajcira4QT8nuxzPR9WCh4wIvKWrBy jtv6XOU0r9ECOWDZrwRNWg6v2JwFGcrEgGreT6NDEEHXsnjzeoQPniX+KecSV1qgjl+f sosA== X-Gm-Message-State: AOJu0Yz2W9yws5Uz13aAnUTFgn+1qz7ouXMSk+Irhpa+OVPoiJbpFn7X +dq/pza4/v1KXwRzwFPKw9UjhNm4g1RUW4Zvi4sCE5TOuatryUPAyRzo77oV2lT7rMss2GWJgBu 0D8xQjPzflgvZ7x4zNNRMYgWzoMhUfgFZhEM7QfJCD2ELlABO4vU8rTJGAi56uh+0Sa8UBVeX07 znT8/di6TGyP9E X-Received: by 2002:a5d:53cb:0:b0:374:c847:85c with SMTP id ffacd0b85a97d-37cd5ad1d2dmr100179f8f.24.1727368916992; Thu, 26 Sep 2024 09:41:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYRYp9B+BCfSScLet51BLt1bG5GUw2b33CnxQRdhUuHU/WOUtSwfdUgPob/UJ524MdkrvJ4g== X-Received: by 2002:a5d:53cb:0:b0:374:c847:85c with SMTP id ffacd0b85a97d-37cd5ad1d2dmr100165f8f.24.1727368916538; Thu, 26 Sep 2024 09:41:56 -0700 (PDT) Received: from XPS-17-9720.han-hoki.ts.net ([213.204.117.111]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd564d2d2sm314272f8f.1.2024.09.26.09.41.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 09:41:56 -0700 (PDT) From: Ghadi Elie Rahme To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] smb: client: ignore unhandled reparse tags Date: Thu, 26 Sep 2024 19:40:53 +0300 Message-ID: <20240926164053.2123925-2-ghadi.rahme@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926164053.2123925-1-ghadi.rahme@canonical.com> References: <20240926164053.2123925-1-ghadi.rahme@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Paulo Alcantara BugLink: https://bugs.launchpad.net/bugs/2082423 Just ignore reparse points that the client can't parse rather than bailing out and not opening the file or directory. Reported-by: Marc <1marc1@gmail.com> Closes: https://lore.kernel.org/r/CAMHwNVv-B+Q6wa0FEXrAuzdchzcJRsPKDDRrNaYZJd6X-+iJzw@mail.gmail.com Fixes: 539aad7f14da ("smb: client: introduce ->parse_reparse_point()") Tested-by: Anthony Nandaa (Microsoft) Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French (backported from commit ec686804117a0421cf31d54427768aaf93aa0069) [ghadi-rahme: Had to adjust the context due to missing commit c520ba7573a84bd37f8803a3beeb8f6f995bf9e1] signed-off-by: Ghadi Elie Rahme --- fs/smb/client/smb2ops.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 0875b1a58289..e8944bd0b918 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -3056,6 +3056,8 @@ int parse_reparse_point(struct reparse_data_buffer *buf, u32 plen, struct cifs_sb_info *cifs_sb, bool unicode, struct cifs_open_info_data *data) { + struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); + data->reparse.buf = buf; /* See MS-FSCC 2.1.2 */ @@ -3072,12 +3074,13 @@ int parse_reparse_point(struct reparse_data_buffer *buf, case IO_REPARSE_TAG_LX_FIFO: case IO_REPARSE_TAG_LX_CHR: case IO_REPARSE_TAG_LX_BLK: - return 0; + break; default: - cifs_dbg(VFS, "%s: unhandled reparse tag: 0x%08x\n", - __func__, le32_to_cpu(buf->ReparseTag)); - return -EOPNOTSUPP; + cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n", + le32_to_cpu(buf->ReparseTag)); + break; } + return 0; } static int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb,