From nobody Mon Apr 18 16:20:36 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 ECF0A11CFE21 for ; Mon, 18 Apr 2022 16:20:36 +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 4Khsc44C9gz4sBn for ; Mon, 18 Apr 2022 16:20:36 +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 435311618D for ; Mon, 18 Apr 2022 16:20:36 +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 23IGKaaU055489 for ; Mon, 18 Apr 2022 16:20:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23IGKaW3055488 for bugs@FreeBSD.org; Mon, 18 Apr 2022 16:20:36 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 263396] Fix a possible NULL pointer dereference bug in ocs_hw_setup() Date: Mon, 18 Apr 2022 16:20:36 +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=1650298836; 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=Yu4jsh6cRSQvhueBZvg+P5AGkcUFLyjW+7KWqVYmhmg=; b=euQoDCUbzDAArPW9WKXx5h9fUJUlrhjTydvhtSs30Kwczh+7XhWeOrPzFzKI6KerOi1Sm9 c/s+qQndbitdXtenR8C71uac/9Pc2euXb29KyafiIzSlqiOn10PyDA4IsCQvl4ARpUO29b HkLMSFAqEDA+5Btnb3kUsHdwTsDOPdFqDNc0kUXoqCctBnVdefsgmAKjhO2ZiAANHHHc4m 67GVv0mcnJ4897G6+78Nnrq3KRo22MpDiT3Y5/N1qwDTjIwOaipjG52T4MAmk1Ij+NBlWD 7fdWP5cXGwEoyUZXbj9lxqKhFUZk27nWFjFihlKQUdHgRPOUUm1+AD6Cx0REww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650298836; a=rsa-sha256; cv=none; b=Swzcbsj0DeTNIKO9aXYdUITFiet0Kr+i9uW5F5HT+0emTAdDX21Cei/7DRDhyN7E7P9ovN NWmSPS3DT2PJpMv4gUygb/IIxEWJ1CfYnB8hid3eyB8aSofj/scS1103jkcnoIeSKS8icK nOybKXa/RIWSNm9/w70KQHCfm/+Ezz56Mo9gW8d1k1HdIko0eh6R2ysJJ4khdFT33L1qYN VZp1goI1lus5cG9QBIJ6O7ZrWdj6qHuDRvEpH5gipMBmCO9fS1kKUHH+HkC30MQ83qWG48 abIdHY/eZHRrIRwhYzghW92OTzEnl2cTWDo1O/QxwtyI0PTYirF0GVnoW63pgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263396 Bug ID: 263396 Summary: Fix a possible NULL pointer dereference bug in ocs_hw_setup() 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 233305 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233305&action= =3Dedit A possible fix for this bug The function ocs_hw_qtop_parse() could return NULL on malloc failure. However the caller function ocs_hw_setup() of ocs_hw_qtop_parse() uses the return value without check, which could lead to NULL pointer=20 dereference. Fix this by adding a NULL check. this patch is a possible fix. --=20 You are receiving this mail because: You are the assignee for the bug.=