Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3892111pxj; Mon, 21 Jun 2021 08:49:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0Kys2t8zAHu4ClIg0hxFPvjnSGYDlAoGZcEtkToNIejEI9RYfIprdlvpvTx/viJv1rS0I X-Received: by 2002:a05:6402:42cb:: with SMTP id i11mr21948346edc.242.1624290546771; Mon, 21 Jun 2021 08:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624290546; cv=none; d=google.com; s=arc-20160816; b=IK3k6R6ojJeVc/gdM90WBtPGXDmG/ja338RiD9pDGjS2vJ35F+PgMBHdyuBQVAS3Hw fH/WrrX/JEtHMCe3HFlNeHDxoHB+8ix5R7LEkDOlipJbgRuUEZF0LgY8lQXYuk37c9Os uvER+ZEI4aGUrVU3A82vM4FCQFSQs0acjl0/cPPAZdykDz3bhW2C34+sKPDe5ajNX9Ji wT11Trz0exhyeMZVDxhrzfk3w2NRj0ytQk3KE24JaMZk0+QFMx7MmTl31o6tiGdNaXrg 7VMqEXjlMjmA0xIGsQHNRJYAVChEMT0XaEMlpURM1hiWIB8DwOmDRLjajSecP0Jx+GUT 50+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EtM0J/nVeGslRIOyE/pPRoPEZFf4Pf55KJfZnOMBln4=; b=Ih4McKAygprvfNVBaE3+Nj8pKZ6pEOKTHUspMW4LB59l4q6MCr0KJgzgIp+c52BALJ MBsoXDHu+vcQLgyLrN34ER5M/roAZq7ut6ZJztbRwk9vgWmrFePSBVh+mxNP0FPhmhgS AuSGXZJy8FAHYbDPBtBTWt3zykUri7UkJAF0er6f3S2U0LoI4iPCVFKIdJCIFezgidez +folQG3DMLkFLzhCtWRYN6+FRDVftD6H79VAxTTRLvGjt6+BuucgwL96vAgA+Zw8L9Rz fPQLrgTjEYGZ3xNGqdAegRSVDM+vmR1iRxBxzkqZCzD7JktrJhVNU4rnfzVAh3OLGcXd zwnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=UYr8k45W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si11488728ejj.154.2021.06.21.08.48.43; Mon, 21 Jun 2021 08:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=UYr8k45W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbhFUPr6 (ORCPT + 99 others); Mon, 21 Jun 2021 11:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbhFUPr5 (ORCPT ); Mon, 21 Jun 2021 11:47:57 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CF9DC061574 for ; Mon, 21 Jun 2021 08:45:42 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id p7so30808989lfg.4 for ; Mon, 21 Jun 2021 08:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EtM0J/nVeGslRIOyE/pPRoPEZFf4Pf55KJfZnOMBln4=; b=UYr8k45WsWjOXGMl6cB0u74KMHNtEAZRwf7aPPdDJcw80nMZpcCpk6ZHa5Ybhk1UjT 0ocxLCQindUGSxtEy7Xcwd18WfLFcc7lpK1L5XymcFQVD3G+hfwvKdsN7lAHetaIDKEH h5nREYRlZgunLsZ92CFfshVFrVOjvUUQTnR1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EtM0J/nVeGslRIOyE/pPRoPEZFf4Pf55KJfZnOMBln4=; b=InM+KesxGivsiQ24JvP901CFhyt0cSvKb/BNr1O8Ugl7c1VAEbvSNi6uBxR5oPh7xp GTrbFK2vfStwwAJVYY747how0UgDj2LHtx2T7UySLtuPj961AOCTKTS2JHsF+zvpWOYs iDhVghP9Q5ootZVCLmCqssj7ILoOrDb544224Pwg/SahetGuHC90N5TOlBKFe6+zS8oG Aq+O/fJqGpaUc2C1jKPkLvYWqfXEKfrnN+ASbXGQwNAcaP0HGm7QpaCpVEyGb99i2zvu 8gcBqwhVlRXlClWx9T/IxkyZh77OKObUnxAlj4CiShc3J8xCNGkL2gqYYOCJYdqMXMuO FN2w== X-Gm-Message-State: AOAM532x8SWuHFU3rOCQEAKb31/x88iABSJwrqebte5LgVstbbTuqzze bGk17ZT73F4TivBUXJEzRG/Akumt4YCvadGi X-Received: by 2002:a19:7608:: with SMTP id c8mr14675749lff.565.1624290340361; Mon, 21 Jun 2021 08:45:40 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id x193sm1190971lff.54.2021.06.21.08.45.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 08:45:39 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id k8so25709459lja.4 for ; Mon, 21 Jun 2021 08:45:39 -0700 (PDT) X-Received: by 2002:a2e:2ac6:: with SMTP id q189mr21891424ljq.61.1624290339582; Mon, 21 Jun 2021 08:45:39 -0700 (PDT) MIME-Version: 1.0 References: <20210620120030.1513655-1-avlarkin82@gmail.com> In-Reply-To: From: Linus Torvalds Date: Mon, 21 Jun 2021 08:45:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Input: joydev - prevent potential write out of bounds in ioctl To: Dmitry Torokhov Cc: Alexander Larkin , Dan Carpenter , linux-input@vger.kernel.org, lkml , Security Officers , Murray McAllister Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 20, 2021 at 10:25 PM Dmitry Torokhov wrote: > > Yes, this makes sense to me and it is safe as joydev->keypam is > guaranteed to be the right size. > > Are you going to reformat this and resend or should I? I don't have any hardware to test, so please consider that patch of mine more of a "I think something like this" rather than a real patch submission. (I often find it easier to make a patch as a way to just make it very explicit what I think might be the solution, rather than just explaining it in English). So please consider that patch throw-away - it's already gone from my tree. And I don't need authorship for it: finding the problem - like Alexander did - or even just writing a good commit message is worth more than the patch itself, I think. The fix is a one-liner thing, the real work was finding the bug. So if you do want to set me as author, you can add my sign-off, but you can just give credit to Alexander where it really belongs. Linus