Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1831622rdf; Sun, 5 Nov 2023 16:34:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWoYV5irqRST9BJEYlyzDGNUWWQi7+Qp9+rYThuefF8TFwCg9/zchl2rST0pP+9ULEggc/ X-Received: by 2002:a17:902:ce81:b0:1cc:53ed:cc78 with SMTP id f1-20020a170902ce8100b001cc53edcc78mr19606708plg.15.1699230883087; Sun, 05 Nov 2023 16:34:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699230883; cv=none; d=google.com; s=arc-20160816; b=jZMA33uWUhZ2R4nZyPdtGXHvKx5AumLXOSCtlJNMEDxKrZrK6bogyhzt52e5LMiAzI awX1AysPHYNGlM62n2gCzJsOuWC7ZNUHtV9BM1/JZgRtCM6D671Qc4YEhRTg7Bz4gamT +3QcVGlsdymKdSdBNwexLzF48ESqwK2bn4q/T85hc8s0B9Y0CNPpXDpgNKgz9wN6/sMH dFWbmg/sYxsbjIyub3hf0q6P3/XULTl6QTIrRsu20QKWGd/jerduE8ctWRRT6tAp72pk MTC0VM73sQWyOyMHCunYuCF6d9n94deSMmUZtE5ExYohIl+ObT97OREFm9T65dZgD0Au b3Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:in-reply-to:date :mime-version; bh=CZQ78xmx/1eRfl04UsY8L//cVD5boCST8JLASCkpPAM=; fh=uOxEfs73UXnpmsgYZepGR6OauibfyleDeycBITvBwXs=; b=qMFeRahWFFE9G3vzqDHSHd9zVa3pbKCUGEFX7a8iFiKTW0BIiTX6GcucrM41WbAR/7 VIN7dZ/AuNNh0D+beRwvA9dTYYUHPrtvYt5cXAzuPaw1c0KtxxQ1iIG9UUJZI1IcOUZS tvQ9xOisXmdIwOV8Xs3cWE1RkzC4C8b/TJbChTVTm2M7+thXxDWldQufjV2scSUL3vDY WmDxXA1459w9TJGGAOLbQJtSziKfsJ38iWvPNW9234+CjeaNIeJShemmEyorXdUg4QeS HfAIoHdUyRjYx8F1+BTL3oQP5sTtF+XOpfIzHiNsriQp64gdo2lp8uaFd20PjIfoZja/ PK/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id km5-20020a17090327c500b001cc3b988fcesi6547575plb.187.2023.11.05.16.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 16:34:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 86DB38060370; Sun, 5 Nov 2023 16:34:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbjKFAUq (ORCPT + 99 others); Sun, 5 Nov 2023 19:20:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKFAUp (ORCPT ); Sun, 5 Nov 2023 19:20:45 -0500 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4502BB for ; Sun, 5 Nov 2023 16:20:42 -0800 (PST) Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-3b3eba1fc32so6344143b6e.0 for ; Sun, 05 Nov 2023 16:20:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699230042; x=1699834842; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CZQ78xmx/1eRfl04UsY8L//cVD5boCST8JLASCkpPAM=; b=t9C6hwN6R8q22+orByfisGve6zUH4hiJV6PHU/FLAUZ7UX7jYqWP4NELMgoGws4fBk BQRtkf4oorFqNeBrhQ+u3puwhyra+jxeOi/Qyj5/7/+TvaiSmg86E6EmQD5kZSbfVXyt f8ZA19HjdLMxUJaqZepdpSSmNqLgdIbXKn5CPwn6Jd9unHx5HumgsdYYku8OKfaT3VRj +3RKh4lpS8fF0gZxuHkNoU1XcRlK8XAKnspOUbUkPkg8N1TzDgsLmlJvl+V/J2f2gyN3 wuReokZzGMVi1kzaeG1+37gigbvwz67ctmePCa7bLazTJQu2OoEVF5Mv8acyVKRVjgCq EYig== X-Gm-Message-State: AOJu0Ywd6bkyu9lhW/9y9Ej0KmOnBbbtv2NiquHC0a49HmlvAXI01LmR cT+4jFTI6uh5pU7M6/ZpvljffYClvBQz36WpQajPckjnQFA1fiA= MIME-Version: 1.0 X-Received: by 2002:a05:6808:aaf:b0:3ae:2ba1:af6a with SMTP id r15-20020a0568080aaf00b003ae2ba1af6amr8868889oij.8.1699230042171; Sun, 05 Nov 2023 16:20:42 -0800 (PST) Date: Sun, 05 Nov 2023 16:20:42 -0800 In-Reply-To: <000000000000e7b62806096c7d67@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000000e304b060970d3be@google.com> Subject: Re: [syzbot] [PATCH] null pointer dereference From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.4 required=5.0 tests=FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 05 Nov 2023 16:34:40 -0800 (PST) For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] null pointer dereference Author: yuran.pereira@hotmail.com #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master Signed-off-by: Yuran Pereira --- drivers/ptp/ptp_chardev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index 282cd7d24077..5b36c34629a0 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -173,6 +173,8 @@ long ptp_ioctl(struct posix_clock_context *pccontext, unsigned int cmd, int enable, err = 0; tsevq = pccontext->private_clkdata; + if (!tsevq) + return -EINVAL; switch (cmd) { -- 2.25.1