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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65FA6C433EF for ; Thu, 21 Apr 2022 19:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392111AbiDUT4Z (ORCPT ); Thu, 21 Apr 2022 15:56:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241640AbiDUT4Y (ORCPT ); Thu, 21 Apr 2022 15:56:24 -0400 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7514D4D9CE for ; Thu, 21 Apr 2022 12:53:33 -0700 (PDT) Received: by mail-il1-x12e.google.com with SMTP id d4so3737869iln.6 for ; Thu, 21 Apr 2022 12:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Fp8I2teBvC2LPg6RF/V9ydJf/9piC7RkC1O1f16Dt8=; b=EiQ7b3lZ3OWSwuxcqo952gjjmRgTBoeyntgQI/ebdhKMrYIkf6YLGQamXtzh7xp7cf Yxd9oN7eIjfMzRNhOsAT6kIxjJFbk7DrUA5Se6gmoxVpra51PH+IeghUi+kI50W6P7D+ AhL8r2v0Xmjh8JBB1JT5+WLPiMX0ssQxonFSE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Fp8I2teBvC2LPg6RF/V9ydJf/9piC7RkC1O1f16Dt8=; b=E/tHFGDD7k+N575PVaK1NWo4UikTR6/x9JsQFsujANnDkNylxB9WcaP9BMOuii5D/H n1ZV+N2d//qZg/On4mHVyX4JFwtlAAeOk51N1UCfie3B+6HYgPIwrtqhD5PnPLxE5aaP DoDJsVH1dXs27sYt2JijUCsMwMusZIvUB0U6jQmAoe3fZIP9o6gJVJo3giipv/q4QzvY 2dn9PQZGA2iTI8BPPurgmxMbrD2093eJA87qs2yOmpIm9+gMfgCVvjrZC26vLBKMuaem 2HwhMrjUvJrl4CjolgTcLJzZXerpZAoqMk2y+dxTA/k9gMZ5zf4bis/Q73QNY0N1Mpmz ZCZg== X-Gm-Message-State: AOAM5325vJM1IZpLz/riJZvhEmA8yZYJdZ7IiVvcaRX9xQKGAktqmefU ua4eVgIfVgmVkvwBMVLxCPerCY/4fy9Fc6P+/utNrKj72SE= X-Google-Smtp-Source: ABdhPJz/vbMC6EQBuL+cwufIsiRm5Sq9qShZyqMFEJQfkpAkkJFjGcqcgvTrNwiR3f42gDv04B6ZxJrQPydbI9eEk9Q= X-Received: by 2002:a05:6e02:1a01:b0:2cc:5497:3ded with SMTP id s1-20020a056e021a0100b002cc54973dedmr624769ild.322.1650570812678; Thu, 21 Apr 2022 12:53:32 -0700 (PDT) MIME-Version: 1.0 References: <20220418231746.2464800-1-grundler@chromium.org> In-Reply-To: <20220418231746.2464800-1-grundler@chromium.org> From: Grant Grundler Date: Thu, 21 Apr 2022 12:53:21 -0700 Message-ID: Subject: Re: [PATCH 0/5] net: atlantic: more fuzzing fixes To: Grant Grundler Cc: Igor Russkikh , Jakub Kicinski , Paolo Abeni , netdev , "David S . Miller" , LKML , Aashay Shringarpure , Yi Chou , Shervin Oloumi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Igor, Will you have a chance to comment on this in the near future? Should someone else review/integrate these patches? I'm asking since I've seen no comments in the past three days. cheers, grant On Mon, Apr 18, 2022 at 4:17 PM Grant Grundler wrote: > > The Chrome OS fuzzing team posted a "Fuzzing" report for atlantic driver > in Q4 2021 using Chrome OS v5.4 kernel and "Cable Matters > Thunderbolt 3 to 10 Gb Ethernet" (b0 version): > https://docs.google.com/document/d/e/2PACX-1vT4oCGNhhy_AuUqpu6NGnW0N9HF_jxf2kS7raOpOlNRqJNiTHAtjiHRthXYSeXIRTgfeVvsEt0qK9qK/pub > > It essentially describes four problems: > 1) validate rxd_wb->next_desc_ptr before populating buff->next > 2) "frag[0] not initialized" case in aq_ring_rx_clean() > 3) limit iterations handling fragments in aq_ring_rx_clean() > 4) validate hw_head_ in hw_atl_b0_hw_ring_tx_head_update() > > I've added one "clean up" contribution: > "net: atlantic: reduce scope of is_rsc_complete" > > I tested the "original" patches using chromeos-v5.4 kernel branch: > https://chromium-review.googlesource.com/q/hashtag:pcinet-atlantic-2022q1+(status:open%20OR%20status:merged) > > The fuzzing team will retest using the chromeos-v5.4 patches and the b0 HW. > > I've forward ported those patches to 5.18-rc2 and compiled them but am > currently unable to test them on 5.18-rc2 kernel (logistics problems). > > I'm confident in all but the last patch: > "net: atlantic: verify hw_head_ is reasonable" > > Please verify I'm not confusing how ring->sw_head and ring->sw_tail > are used in hw_atl_b0_hw_ring_tx_head_update(). > > Credit largely goes to Chrome OS Fuzzing team members: > Aashay Shringarpure, Yi Chou, Shervin Oloumi > > cheers, > grant