From nobody Wed Feb 22 16:29:53 2023 X-Original-To: scsi@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 4PMM7j6snWz3t9R9 for ; Wed, 22 Feb 2023 16:29:53 +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 4PMM7j2Tm9z41Yf for ; Wed, 22 Feb 2023 16:29: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=1677083393; 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=m5OtnMqPir35upCTi9+hTeJa5XgWSc+2dMdIZTr4O+4=; b=ANkcT2gD+SvpDSAcvOaO0IDUpwsdh1DJaWom9JQb01liFk4kqOwA5SeaSdU3+0aqpksUQB EnnG95bWUJL/B+a96N6Oh1/E+i0BLflY6IMJ0Hlcfcf7eJIxc3C4JihVO54K0EEZPQAuKG b+FUq7BbW8s/h+nYEQiTC1jTTu1XJCw6LdiZKz+7+NiKgu1oq/HS/uvrNoFGAOzlZNok6G GTut4i13TtuPyE4hLKnAh3zS4bJm+usvYUGfWDkI2tCP/MLtCWZ8cj+QtWq2zApWybvWFi YFcKbU0CN/0bWDfSqEwtFEMZXNnDHtGuuyWTCaqXrUc0An9AebFwC51UwBJ14A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677083393; a=rsa-sha256; cv=none; b=k33MZsQKlL1qZVI6x/8vCDVGg93ET+bGkbIePT/JjDEHbIScZRbbxcXCdTT6GbTUZApzHR W+GQTbWakG0ksUHyVi1u6dC4czBA/olDBjTbEu69mP6Qtot+q5t0Ex+jbOpR6yIRvSYH6M FKxi8PacrAQwOgOjjlKCLfFQnxw2UQeZGNb1rj/dd6RYN0WC9RuQDiCEkdrSpSs2OmKvxK 4UmcQVYNiwbnN1pN0P4GUrYkvdlnkOnBgT+1IUMVLzrXJ7mAy1b7I1o0/P9tbMF+WfXUqw VbUfitf+5DMVQjjWTBWvaxWJ4nkBo0DRivXElE34pJf+0gBZsdJOE98BCQe7VA== 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 4PMM7j1Xg0z17Lw for ; Wed, 22 Feb 2023 16:29: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 31MGTrvc034706 for ; Wed, 22 Feb 2023 16:29:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 31MGTrE0034705 for scsi@FreeBSD.org; Wed, 22 Feb 2023 16:29: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: scsi@FreeBSD.org Subject: [Bug 264848] mpr0: mpr_user_pass_thru: user reply buffer (64) smaller than returned buffer (68) Date: Wed, 22 Feb 2023 16:29: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: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: asomers@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: scsi@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: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264848 --- Comment #7 from Alan Somers --- Mark's guess is incorrect. I'm seeing this issue too, and msg_version is in fact 2.5. I can't find anywhere in the code that sizes a buffer based on msg_version. In fact, I can't find anywhere that even sets the MsgLength field, so I'm guessing that it gets set by the firmware. Unless somebody h= as accurate documentation for how the firmware handles MPI2_FUNCTION_IOC_FACTS= , I think we should just unconditionally allocate sufficient space in mprutil f= or the larger reply. And we should do the same in mpr_get_iocfacts as well. BTW, this is the commit that originally added an extra four bytes to the re= ply buffer. https://github.com/freebsd/freebsd-src/commit/69e85eb8ae4919e0806bc2957cbc4= a33f9138b54 --=20 You are receiving this mail because: You are the assignee for the bug.=