Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp609826rwe; Wed, 24 Aug 2022 06:28:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR7nFGEeLMpgTlYV+DEgUTBfJ9HwCtWs72GJPu3xC/e4Npu43gsUBRyMhqQYGJYFAu5ba1Ev X-Received: by 2002:a17:90b:4ad1:b0:1fb:eba:9977 with SMTP id mh17-20020a17090b4ad100b001fb0eba9977mr8194927pjb.182.1661347705397; Wed, 24 Aug 2022 06:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661347705; cv=none; d=google.com; s=arc-20160816; b=ZaW5d1/i8c/Mcw5rAwpyRoAeVN1SknAw4rbuy8gQqcqs86O9gcqqh88AnFFijE1XTQ E3QekJUbvP5SIwVzXqT9kZkQ1mtUzdId03SDlTWcHWvlNx7aCFt8AHi6AeS2ec32NzPa 8aPGEALmtIBeyYjmxl+4x/hfzRLglTLerGwRVTGGj8kwAhZIqr6uo+stImJ39YoUFUoR jE2D8rO3HeGhosw5pOLI06tcmkgPfKUxqK3wIhJ/4S2455spWuIS0J5J6kbqxUFZqSCG cDHmiZAcf+wc0CrAhVPnyn6WkwUHRrTz11Jzu9K/kE+9ZkgSzKcqSK5v02BJzRo8Rzj2 l5rA== 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=9jr+amK0uWEEWGvSLDxuMVCNNDt0iE/dvefpOk4UgzQ=; b=nlwyxpDfWJrDaIS8nfvWsfpx8b/aN5pnmHfHAjgjN4Bh4Aj7k/PbQFOeM7P2Zgmg9x yIsXUxQF89e4Nt0ce8GPhgU8kYqQokXVPAjfesz+vH8J53gMl1c1Tos0Mpno7+5DIoBm ZVT0xGh3bAyqLbrNuaPpNgtaVeApLYpNE7US1BgMNp7rw8iorklUV39wVRGu311I87ti +cabrX8lpKAVQ8xyoeJ6GEMt+ZJGNw5O08JbUuiv59o3wnPtn9ysVLKShoh+jvcg5zXL ektFI75MIiTl9XZWvI6gb1SXsyPPa/ghP7ynJp/tuYq45jGRJtHioHJOrBHyrAPFCPHj QkTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cTr+YYyz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a170902bd4b00b0016f168b4368si16818249plx.547.2022.08.24.06.28.13; Wed, 24 Aug 2022 06:28:25 -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=@redhat.com header.s=mimecast20190719 header.b=cTr+YYyz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236822AbiHXMii (ORCPT + 99 others); Wed, 24 Aug 2022 08:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236609AbiHXMig (ORCPT ); Wed, 24 Aug 2022 08:38:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A64A8E998 for ; Wed, 24 Aug 2022 05:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661344714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9jr+amK0uWEEWGvSLDxuMVCNNDt0iE/dvefpOk4UgzQ=; b=cTr+YYyzy/Ic98M1akm8TFGRHJungRY0NJyZeLoCDtv4nNdOVAy7iwwjurYG8m/aW7Z9jM P3yoR00CThcxDiWzUdWubvsbsqlkmKQtqOj3qjH8w2LdsUAXmyTK0EQc7oDwpabWgKEprY T9NPCE3/f3kR8XAHq6FG/L381LlvwBM= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-227-u_GTDEfSPQq5hjOKkUhgYg-1; Wed, 24 Aug 2022 08:38:33 -0400 X-MC-Unique: u_GTDEfSPQq5hjOKkUhgYg-1 Received: by mail-qv1-f70.google.com with SMTP id o16-20020a0cecd0000000b0049656c32564so9489006qvq.19 for ; Wed, 24 Aug 2022 05:38:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=9jr+amK0uWEEWGvSLDxuMVCNNDt0iE/dvefpOk4UgzQ=; b=UsoUmV/F0OgiT6siYWr3amTSS0s+fPXrPrJpqim2jSvj0cStNr/hY9Xh1QG2SHmVTt Gawt+erZ1DIeIk729FumtXldvLrWMzM6vEVWbAfMkvhmvE7kydaU7vDqmzKAM7Xl35C+ Zayq2k9apkCb+ml/Nh8daUdNZuOFc9lFqUFL2eg5lkCdbFpBjFB1pnUc66Rl5T3JHWP/ f0DiPcFt1BxRKVD62fT2v9pFFjcyDZboq3iegg4LAckeF5xLhTr9jEaFPYuuOzdIA5EC YN1Kk6uwqvn8EGQt+0BZ0cY3UczlU317xlXKFsTNaZlRuNnp76oo7TCs3v4kTcIiZAFK yc5A== X-Gm-Message-State: ACgBeo1zjcuVJZJRN+1z/jthRmd7cH3EKxp1mvvWTRq+Ot+be2oy7RvZ K07wptT0A/7sp4eq4EKHqYKOBUY+QoQ5v9kNxpPatfNGCoh06RrYoNTEIGznhG+N9tMzP4oW8WY F58ntfY9Rtl8VhbNYMzpqUYdPweSXpmrw8xHzLtjD X-Received: by 2002:ad4:5d6f:0:b0:496:5ad5:fa40 with SMTP id fn15-20020ad45d6f000000b004965ad5fa40mr24705004qvb.59.1661344713149; Wed, 24 Aug 2022 05:38:33 -0700 (PDT) X-Received: by 2002:ad4:5d6f:0:b0:496:5ad5:fa40 with SMTP id fn15-20020ad45d6f000000b004965ad5fa40mr24704987qvb.59.1661344712950; Wed, 24 Aug 2022 05:38:32 -0700 (PDT) MIME-Version: 1.0 References: <20220822071902.3419042-1-tcs_kernel@tencent.com> In-Reply-To: From: Alexander Aring Date: Wed, 24 Aug 2022 08:38:22 -0400 Message-ID: Subject: Re: [PATCH] net/ieee802154: fix uninit value bug in dgram_sendmsg To: zhang haiming Cc: linux-wpan - ML , Network Development , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, cc mailing lists again. On Wed, Aug 24, 2022 at 7:55 AM zhang haiming wrote: > > If msg_namelen is too small like 1, the addr_type field will be > unexpected. Meanwhile, check msg_namelen < sizeof(*daddr) is Then check if space for addr_type is available, if not -EINVAL. If addr_type available, evaluate it, if it's unknown -EINVAL, the minimum length differs here if it's known. > necessary and enough as dgram_bind and dgram_connect did. > you probably found similar issues. It is a nitpick and I see that the current behaviour is not correct here. - Alex