From nobody Tue Jan 25 04:18:40 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 443121984DFD for ; Tue, 25 Jan 2022 04:18:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjYWM6rZlz4m7X for ; Tue, 25 Jan 2022 04:18:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBF0922EA3 for ; Tue, 25 Jan 2022 04:18:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20P4Id2E047718 for ; Tue, 25 Jan 2022 04:18:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20P4IdFg047717 for bugs@FreeBSD.org; Tue, 25 Jan 2022 04:18:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 261454] Fix a possible Null pointer dereference about svc_xprt_alloc() Date: Tue, 25 Jan 2022 04:18:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: zhou1615@umn.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643084320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jCGxzjHcx0IlNZY8s65uHZoFnkjv/+lN+3ho2Zy38Ls=; b=Ad1bkBAXc8b+ufbkRGFD6Rh7e4Y9kAUeQML1NHZstSIQ412TNYyMP1cIUCk/EsqLMxFHi+ PP11Af6yHC+AwG73xBLuQvY890Xxs77AvH4f2bXXQzPK0125SoeNVDyyokOpGSCxRMigs0 4RBB3K5m74Y5+5l7/522y0R2Nk/USH9yQzGzkqvGYwRms/3pg8ugZgtSwXlZR60SSTRTiW 099DyH9o2CYZdAe22OuL+HyV5pt4tWF2x4nHUBn6inLr5NO7vWrp1ycHREdGSQRTb+/tS3 875CtExDTn06XhQfpPH+RiZPjooce8p8ElgwtxfUVziTjI/6Rr8C2S12bzlu0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643084320; a=rsa-sha256; cv=none; b=EioIACSTbHJmxgToXAO9Cg5UpG2JCvGKv98Jr1ZE9H4qwg2yvZhl4ANM4Bd0MW6lsrrdyb C4pUS2uX1PTMuG6x+YWMnU5CD9l2ZIT0PoITppqs7pcz6E3QLO80s8X21aUI4AkgaIjOFW /A7yRK5JuCkCrzdLOPes42VUFdY2pB4Ff+W/VeJc0VGnEtszLwTic+7xgDUXhM8xgSskep rHFByrDD9f7uGVJyTFg1HM65whXnRBV6Y/TITIR4w3dIRyyuyiFniRZxAforMsLobXi0Jn FkTsG1adGEMKdnMgJtQCCtLJA8ed+ap3YS58BSCbSYbgA1HgiodU0mYDS7X8vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261454 Bug ID: 261454 Summary: Fix a possible Null pointer dereference about svc_xprt_alloc() Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: zhou1615@umn.edu Created attachment 231294 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D231294&action= =3Dedit A simple fix for this bugs In sys/rpc/svc_vc.c() file, the return value of svc_xprt_alloc() is not che= cked before the dereference in svc_vc_create_conn() function, svc_vc_create_backchannel() function and svc_vc_create(). svc_xprt_alloc() could return NULL on failure of allocation, which could lead to NULL pointer dereference. Fix this bugs by adding checks of svc_xprt_alloc() in all three functions. This bug is found by static analyzer, please advise. --=20 You are receiving this mail because: You are the assignee for the bug.=