Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp722831rwd; Sat, 27 May 2023 05:36:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zWDUNwWMSH+ZO/1SwoXzseQHlP15TVxBMMaLD7K6JgoAt3V54Wj4894lJRHc+lhGYRUd+ X-Received: by 2002:a17:90a:d513:b0:255:b7de:b0a1 with SMTP id t19-20020a17090ad51300b00255b7deb0a1mr5837768pju.10.1685190993784; Sat, 27 May 2023 05:36:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685190993; cv=pass; d=google.com; s=arc-20160816; b=htWbZ07LI6peyjpxIE2GIUCkxrfDB2b9U6hBUnFmsujx4VwkyntDhNd7NF+/nswgEa 8NurpdyV0YSWyOUkc1TuXKwTnawPlHDfphi6xBbwfuacmH1nNlLlf5cLzK7pwEm9CHIK cfLL5GOEUs0ZNZSl93E17gmQk/IVOoQf1nquBra94WPWQqP7skPqd64Pzm/D0bB1Hs8w WD6iSScBgLpUFNkjB2BfJqna0OplYI5LszF2mXuGlG48joBfQMgmF1GS+2wyIts+m/cb xB8ys1ZpIf5XtLdbiOsb63I8Q7C6VVLcyHkBJ39/FcRGAiCbWKp9/p5zHB0njCgDtsGu bRWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=maQqIPdSgN9Tu09uprFT7zmFxrkmYWUW+S1vRlvA/uM=; b=xz07Ylyja8F0myb0OOGw0hb1qo6zSeen9i2f9545dqGQeTEyr49XFWqDxIDwlhEhZE WF1pO08OPwQFdf8VjcSt0XS64VLHtFSijP2heRbYtG1OpJxku3XZTbzc3KKmmGUVMns5 83d3VXZ9xB3PjUDYIiNpEOoQww2aXfa+INGu1e9LZ4466gUnxggCooSvr9KYqlX/E8mW KQOOqCP/JvjyiH5kTRopsFyzeE0QRfIS3nIDoZ8OLNfccyp6H2TeBEws5lOMavC9ugjw WYafFhyjeWhq4DhnaJ23xuTaigjUKEDcp+Tsa8R4W8LGT1tBb9px83dR+OEzauv/itx4 wFxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=OQ49p3AR; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j27-20020a637a5b000000b00524cf947601si5980537pgn.23.2023.05.27.05.36.18; Sat, 27 May 2023 05:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=OQ49p3AR; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232256AbjE0MAH (ORCPT + 99 others); Sat, 27 May 2023 08:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbjE0MAF (ORCPT ); Sat, 27 May 2023 08:00:05 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A8D9C; Sat, 27 May 2023 05:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CbholruBdVlE2Gu0NEwi4CKud9EEkF36rulcYg4NDOg52B8H7ciP6WcHqPNGam1ZvddVTuJHVYV8eMiNApqWhKSpfCd+OFeY+MaFmfE91O3ALVTD1SFqfp4gyggnUBxaUqauHefrajPmBMWWqBgINWnsdgJVOe3ISagDaK+J+6wqc1q6FH/x2NcQbC1fqmhKPnm19H+l2kLdDtJ9C71aVf4xgjRwW/c8lA8AXkfxr9uPl8T+MVNE4JwH4PDT1AkZhuJ3moJ/+28l2nE3NqG4S6ENOeA7vgu2Oknk6qkQGrOTHXrNfLwsp5bFN/p76EUwEQAPhv1TukhJIvpksaLrXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=maQqIPdSgN9Tu09uprFT7zmFxrkmYWUW+S1vRlvA/uM=; b=JrPCzvbI1LGFr9b4Wyzvy8rdEkPIJPOkxnFN32rCRtRQYV73R4QAuDh6A/Dtxkvtsh02Sv0Bpf1r+BBju/UH4TGjKfKj/79xU6ofMLmfqEMmFdQffwz6iuLWgu+86+AclHrF+rzAhbFfL9PnsbL963nAhwDGH2n8s7BrgB14CDTHNFGqRGcA2XqoZe6TBBFHJKnQzIie0suv4f2D2u2eZDaza+N7pnS8oYiknIK6XTpdsbGIMJ4AE5pofObrEFpedKusOqGvRabooN7gkKmV2JXqDaS4XiJgUw6xkd0EeKnht75V99wXM0Ae7x6QzqdJH9sjv4WnOjquBv9f7KniLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=maQqIPdSgN9Tu09uprFT7zmFxrkmYWUW+S1vRlvA/uM=; b=OQ49p3ARuTwfjcNKe9ZuTAutH9XyrNWH7GsVJelYtRtZ5jIhIrKEXQbnVgbg7TkaqtbwvM0ArTmM2wJN1zo4v/8EHfXcyliScaLYviHV0Ljcu2I97xi/MsGlpvkLGE4lBlbWBNv/FqEassqwoJ96M6jdo97cKU80o1mcW5AaI0I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SA1PR13MB5008.namprd13.prod.outlook.com (2603:10b6:806:1ab::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.21; Sat, 27 May 2023 11:59:59 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6%3]) with mapi id 15.20.6433.018; Sat, 27 May 2023 11:59:59 +0000 Date: Sat, 27 May 2023 13:59:51 +0200 From: Simon Horman To: David Howells Cc: netdev@vger.kernel.org, Kenny Ho , Marc Dionne , Andrew Lunn , David Laight , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] rxrpc: Truncate UTS_RELEASE for rxrpc version Message-ID: References: <654974.1685100894@warthog.procyon.org.uk> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <654974.1685100894@warthog.procyon.org.uk> X-ClientProxiedBy: AS4P192CA0040.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::16) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SA1PR13MB5008:EE_ X-MS-Office365-Filtering-Correlation-Id: df13a201-0904-478b-3f92-08db5ea9e4ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nr4gKrf45fcrCsyYj1IHDeyESS9lpqFLqW+N1hvRpHUzMryrxI/EuPWEg6sRz2bLziCSLv2JoalWCyCSm+7G1BUDUh4sGFKWT7UUx80LktHiCRDzpcEoEdaog/Gr36Bd35CYB9p2Fkjesfv10ZQSkNX9g1rntdxocC63tcl23vFEpXo4j8G+0DKcbaiIcXOsN3ueKlUNCdhxgsqUh9Ozhspkyd8N+Z1UmhrLYpoxew7oXqTr/l6KzsfN4f1HhZ7jIIMHx2lIiCtdBpNfqM8I/HGJMexiFI5CzAPcT9eZCjiPsofoiVMj67JH2Xl0b9KtiSbmiNejQ5xngW2cp2w6r+LVi++8FCgbYBRJrLdLrMI5pawHsP/4jbU81CC/q7mZ/LDwSyPfT2qqXc40EzEcQDhS7pylYufT278hMHp9PyWIc12RBMmf82IREOEFmDAnjSmd2kHEAHHA0uA/kiQNiKa6+IXO+7+CoruTqK42br4/m4qwsB7MJwnsvrP6Ty6UHjWhtN859Fs5MIvA5uxXQAyGQ3Bf8IWAR8UqMpYx3l8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(366004)(396003)(39830400003)(376002)(451199021)(8676002)(8936002)(44832011)(83380400001)(5660300002)(7416002)(38100700002)(6916009)(4326008)(41300700001)(2616005)(316002)(2906002)(6486002)(66476007)(54906003)(6666004)(966005)(86362001)(186003)(36756003)(478600001)(66946007)(66556008)(6506007)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3oN1Upr2b0C4oMqaUbiFfAv4u44+kbStdx2u3id9hPXiZN+QV1YNTbwRZAP6?= =?us-ascii?Q?vu2aTBOw3/MeIFcbQxLQDMiQjp5SGasgiBnLvnWpnK8YgJDSlyhSxqOi42qQ?= =?us-ascii?Q?yBI3v5DXXTNrXkJzOlVgxcrvSX5u3DIYMFN7IxFSaXmJISbJeSIulZgQuS5j?= =?us-ascii?Q?Ne5kuJJ7f+1VNXgnHsTqjPF+3K6cxl+WMVBH+LAJ7wgeLPT3uOJ9qib6YNxY?= =?us-ascii?Q?u21ZptXb1nV5BLOHMnV5rtRu7XzAhdmVXOJs3nRm/pRWEVBLei4dCed5l1La?= =?us-ascii?Q?OgAX1WOwuWzlcu5QRiDx522rlcNZUbaCbwRuUhilfC1JR+RFir95AGAjWqns?= =?us-ascii?Q?wpjrMQeZqRWVTm4zzrHvlIRp4Oh5aRJzQkTajR6ZCocvIxHVUkF6LJJeMww6?= =?us-ascii?Q?OHs8cPd5cd3RsrEjV6RQqEs98srHTYfRhpKMAxk9nHSgUeTC2zewRMsbXo+F?= =?us-ascii?Q?4ixdN9Sk+CTg+dSUYLiF7lJA3k47DYO+uxkPMu0FsBktW/tpg0i1ttt24c0v?= =?us-ascii?Q?sorh8OfisAJ09LRKTiypI8t2g36vyNfTx96X9NqYYW8/FHUTjDAhHzy5RUqv?= =?us-ascii?Q?UWpC8C8egEEfXywiEOtSWTsqV8CZazaw18vKm/XDE+3bWvkBY3VOshLmEtbW?= =?us-ascii?Q?6++Idf1wwsMRv6w84tPNh7gCKXzoUsVVR/5FYJ4Un03yMENs3RKo3ToI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48szIPHF8jFUS05pWMEH5dTQyonACIqVb?= =?us-ascii?Q?Q9VPCs8IuzmpkI7aSTGxVNS3Q6tr9dH0QX1skhEvy6OAcCY4DnojeJ1LYSXu?= =?us-ascii?Q?c0Xbdw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: df13a201-0904-478b-3f92-08db5ea9e4ec X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2023 11:59:58.9723 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VHzpMLspaKsiU0GyTxUwPxkFfH1cGr2L2qVcuHBPzxKZcWH4+RgAEdDE1HaTyNB+FJudjA76Ul5NA393rI3b/q5SFVLSW86aKjzDLA7EgDI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB5008 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URI_DOTEDU autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 26, 2023 at 12:34:54PM +0100, David Howells wrote: > > UTS_RELEASE has a maximum length of 64 which can cause rxrpc_version to > exceed the 65 byte message limit. > > Per the rx spec[1]: "If a server receives a packet with a type value of 13, > and the client-initiated flag set, it should respond with a 65-byte payload > containing a string that identifies the version of AFS software it is > running." > > The current implementation causes a compile error when WERROR is turned on > and/or UTS_RELEASE exceeds the length of 49 (making the version string more > than 64 characters). > > Fix this by generating the string during module initialisation and limiting > the UTS_RELEASE segment of the string does not exceed 49 chars. We need to > make sure that the 64 bytes includes "linux-" at the front and " AF_RXRPC" > at the back as this may be used in pattern matching. > > Fixes: 44ba06987c0b ("RxRPC: Handle VERSION Rx protocol packets") > Reported-by: Kenny Ho > Link: https://lore.kernel.org/r/20230523223944.691076-1-Kenny.Ho@amd.com/ > Signed-off-by: David Howells > Acked-by: Kenny Ho > cc: Marc Dionne > cc: Andrew Lunn > cc: David Laight > cc: "David S. Miller" > cc: Eric Dumazet > cc: Jakub Kicinski > cc: Paolo Abeni > cc: linux-afs@lists.infradead.org > cc: netdev@vger.kernel.org > Link: https://web.mit.edu/kolya/afs/rx/rx-spec [1] Reviewed-by: Simon Horman