From nobody Thu Feb 1 23:08:53 2024 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 4TQvjL0FQcz58sBV for ; Thu, 1 Feb 2024 23:08:54 +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 4TQvjK4tggz4qn2 for ; Thu, 1 Feb 2024 23:08:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706828933; 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: in-reply-to:in-reply-to:references:references; bh=Q4TvM/Omni9xwSp0rXZvwHxt4wzFzI+y9gQmhQgcxhY=; b=R1TzBpwsFv8/G1TTUcUpBfBNKW28Mj/GtAJ2CS/2iITjADmdjRvmx7ioHzgWIuPgjlWnE+ QHvz85NGNx1I2950UTtz9dKqR6JhPGVubkly/MUwMlPUsS9RdjdbTpUFD+Xd+WSbwKN2NW sWsMwbdk59fubMuCCozwuXieFnLWomAc/4SrJZh2JwJPUPe0nnJieozehb5jhu6lOXyBbu OIfMIKj72sPknnpKI/uyERVS7Dcjh9Xto68TemjahNgHvj8EzEzrMI6KCmRPUP32uJK3M+ QcKyfBIntMMckF0q/dq4m6pAXD6kV8jj7QsvU/ssp0D8z0hFZEpWwCyxSASoEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706828933; a=rsa-sha256; cv=none; b=GuP+PUuN9KVJvnxMpQJwef5elCeIimJPWIwOo0QI+k3hXkhIQVtlpYm20xL0hdn552gT1N bZWrsgW3LRvWnJ2vYjkLkTJi413i36qnO9dI9xyHGT71WQDobR68Ubx6zTc5f9uuLCCNFY 4TBDtPEFSlc9DhTB33K/+aYj9eRkiest8k3g4L36eS+vMe2SbcEdJv0uE+vDYBvveueNy8 BVr+79yB8GqZJC8EIcPhlcLJxs5kKLcTOTvx+PikA8Und/t2yOuaNh2Fo/PD4TcY3w6HHn /1PJD9EXW6pngzDGy1X9LdM+IBJwU6r5XtkRqAGr+keDEThkTWjoH71MmW5qAg== 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 4TQvjK3yJ5z1Ldf for ; Thu, 1 Feb 2024 23:08:53 +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 411N8rri073574 for ; Thu, 1 Feb 2024 23:08:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 411N8rMk073573 for bugs@FreeBSD.org; Thu, 1 Feb 2024 23:08:53 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 276770] Some potential NULL-pointer dereferences Date: Thu, 01 Feb 2024 23:08:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: w290680224@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276770 --- Comment #2 from Qiushi --- Comment on attachment 248120 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D248120 The potential NULL dereferences The allocation functions that can return NULL pointer Potential Buggy Poi= nt=20=20 Potential buggy uses (the returned pointers are not properly checked) cam_simq_alloc sys/cam/cam_xpt.c +910 devq =3D cam_simq_alloc(16); nvme_allocate_request_vaddr sys/dev/nvme/nvme_ctrlr_cmd.c +39 req= =3D nvme_allocate_request_vaddr(payload, sizeof(struct nvme_controller_data), cb_fn, cb_arg); nvme_allocate_request_vaddr sys/dev/nvme/nvme_ctrlr_cmd.c +63 req= =3D nvme_allocate_request_vaddr(payload, sizeof(struct nvme_namespace_data), cb_fn, cb_arg); nvme_allocate_request_vaddr sys/dev/nvme/nvme_ctrlr_cmd.c +262 req= =3D nvme_allocate_request_vaddr(payload, payload_size, cb_fn, cb_arg); nvme_allocate_request_vaddr sys/dev/nvme/nvme_ctrlr.c +1256/+1259 req= =3D nvme_allocate_request_vaddr(buf->b_data, pt->len, nvme_pt_done, pt); devfs_alloc sys/kern/kern_conf.c +1331 ndev =3D devfs_alloc(MAKEDEV_WAITOK); --=20 You are receiving this mail because: You are the assignee for the bug.=