Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2555221pxa; Mon, 17 Aug 2020 12:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSvwkqIPCqq1nR8cfaU200woVs/4sDihWoPl0Vwx/73bofb9jxWoRJ8Q1YOysuBeWJCdGy X-Received: by 2002:a17:906:82ca:: with SMTP id a10mr16367818ejy.524.1597693048962; Mon, 17 Aug 2020 12:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597693048; cv=none; d=google.com; s=arc-20160816; b=pviSVnSo8+Tno7eOeaLPlDwEbz1lzXZqHfbFjQL05+2AAWAmabPUn8CEhxnQgsKJAU cBwZ3InQwBqSkW+Ozse7fb/8UcrtYNVr2UbFmjzH5mfPffQODybpPuN8/ifEq2Zoij86 IP/MH+WMXZizDpQEHaieSnFVr+MDcBr1jqldn93OuhgEbL/sLJDJ3lWPsj+G1HFYNtFc omUCv8LqpOVk+OtjfRu05/8zPa9LUgj5fnpy5vkM/o1rmvvkKYmCjcoxmrAmmY7xXBrI 6rXz4q03Z/Dyp8/qJ8L1wjfmtn4AVFSwkrndC+Z8nX20d6ihMd2gqkOnwBVXmXGWbo1q QIEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=b4jvSfmqiRCgk0iAJ2C9/9IL6/+J6H4gIpuhh/jQCKw=; b=TgwOJfeSFKUdhoCV60krIVFXaeltU08uWzKLtv3Tp7UioOMPqF1XRiUalJmH3vppIP e+eUsN88zbkSXAXrpzWEw2x23g8OJRtvbQ18fVYd+3j9CJ6gviS0fok2/P1hV/0FXSAM oW3jXH5s43S5uVKCry4lmzuEzGVHZ8HGzURFBXmDE4pgyZ6l0qyx/Lh0zE4c1vWhWEFN x3Qug2cs7bxKeA8wir5O2ImN8nmT9ZRXFoqJD9oi4HfpRoiU5gJPWGnbkbFWdyHEsntP z2ntkWAOTfr28rPPpdZTyLO1hOAS+HnV8eWLlvSOzfgOSptc5AY5zrAdsz3IjvvSf+L9 4IiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R5VeWDKm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op18si11612625ejb.207.2020.08.17.12.37.06; Mon, 17 Aug 2020 12:37:28 -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=@kernel.org header.s=default header.b=R5VeWDKm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732353AbgHQTf1 (ORCPT + 99 others); Mon, 17 Aug 2020 15:35:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:47888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729876AbgHQP3Z (ORCPT ); Mon, 17 Aug 2020 11:29:25 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0514623B80; Mon, 17 Aug 2020 15:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678165; bh=ZR/3Xg4ei8Mp2hzeIeLrWX/F4kbxmqO6zPHu4ugSDJ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=R5VeWDKm1b0ZZn5KRGEmRUgmEZTIvlxHYP5nYj8NiJ+KHqb4H94KEeggJ19IYPcoL uSBTBizhmYJA0no1lqy9JrzTnyKhv/x7wsOCOaW6YnkupgWyQx9+ACz5JbOKgGsqwk 1LvwZ6WpuyF+s/SecPztnl1Cg+qzZMDvyySA8ORY= Date: Mon, 17 Aug 2020 08:29:23 -0700 From: Jakub Kicinski To: Necip Fazil Yildiran Cc: davem@davemloft.net, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dvyukov@google.com, elver@google.com, andreyknvl@google.com, glider@google.com, necip@google.com, syzbot+f31428628ef672716ea8@syzkaller.appspotmail.com Subject: Re: [PATCH v2] net: qrtr: fix usage of idr in port assignment to socket Message-ID: <20200817082923.60131b6c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200817073900.3085391-1-fazilyildiran@gmail.com> References: <20200817073900.3085391-1-fazilyildiran@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Aug 2020 07:39:01 +0000 Necip Fazil Yildiran wrote: > From: Necip Fazil Yildiran > > Passing large uint32 sockaddr_qrtr.port numbers for port allocation > triggers a warning within idr_alloc() since the port number is cast > to int, and thus interpreted as a negative number. This leads to > the rejection of such valid port numbers in qrtr_port_assign() as > idr_alloc() fails. > > To avoid the problem, switch to idr_alloc_u32() instead. > > Fixes: bdabad3e36 ("net: Add Qualcomm IPC router") > Reported-by: syzbot+f31428628ef672716ea8@syzkaller.appspotmail.com > Signed-off-by: Necip Fazil Yildiran > Reviewed-by: Dmitry Vyukov Fixes tag: Fixes: bdabad3e36 ("net: Add Qualcomm IPC router") Has these problem(s): - SHA1 should be at least 12 digits long Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11 or later) just making sure it is not set (or set to "auto").