From nobody Mon May 9 00:19:26 2022 X-Original-To: net@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 1406E1AC479E for ; Mon, 9 May 2022 00:19:27 +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 4KxMHL6MlNz56ZQ for ; Mon, 9 May 2022 00:19:26 +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 BB9DC2EA1B for ; Mon, 9 May 2022 00:19:26 +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 2490JQ9q062056 for ; Mon, 9 May 2022 00:19:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2490JQmo062055 for net@FreeBSD.org; Mon, 9 May 2022 00:19:26 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: net@FreeBSD.org Subject: [Bug 263824] genet(4): Driver interface may overwrite memory in a consecutive memory copy operations when parsing TX packet Date: Mon, 09 May 2022 00:19:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: needs-qa, security X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jiahali@blackberry.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: karels@freebsd.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable13? mfc-stable12? 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: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652055566; 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=u1WIM6jTcTWpw89vnQyZeE/+8iwZuT1NALOJnteHdlQ=; b=HTfTibuUR8t79QTULYi+8gOqeE7OgzQgB0ota2Y+O0hT/6N3y5sGry3Smkc/kUD7zTxGYd E33l6+1sv5JSaM0Q/70zc3Kma5f1GiQHFIt5Myk0iSPy9YwnSJbubmENspwCe28GZDnNal aQwqUktvcA8V/pQPcKBXtZgL2RgQqFOKvca/1K6SAQ5WpBbb+lB+x1OnuPYVZ7TRRHjuBF cTUcrL+hmbLg1fe0GRRAT9+CygN/C8rcvqrwS4/XNThmWoEa4Nx4vy6b+IBRzyNlYlb0Rd 0xIOKgTmDfxWxHZT+TKdoq6B6520S/a64YM6F2mczlGV9EN5uL4bFWwf4rX/Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652055566; a=rsa-sha256; cv=none; b=i23wpasMcR2u1odKq3zH4TpNcAiF/K/T36bTgHuqnWJ5V0Cm46G1+Xi1/sTDTd3JRlJq90 Z1OLvCAyCG1ElioNXWHwil4RY797/mnsSgR6bwnOsRrcJ9Y+fWyv5EKv+z9lDdAzAKDRI5 GGwWCMnI8dbMVt8pH/w2oLrq+oysyfO4sKlsYX4iW9A4lo0sU/N2JtZ6YEfAOo11i+MG4x N1sgEhixOh6o/MN933op1pKO0oNsgtUcEQllIsoSUNFIM1AFG37ZlyQyoQCDbaFbcFYRAk pCl8svuiYGaQJTOMyfSuEnYmSm8c9fyftgf38Uq+0YEhOO2sOItyXhd69bpRwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263824 --- Comment #4 from Jiahao LI --- (In reply to Mike Karels from comment #3) Hi, Happy to hear that the problem can be fixed. I cannot reproduce the problem= in the current release of the Freebsd image but I never try to change any parameter in "sysctl". This problem happens in my own development environme= nt. My development environment is not entirely based on the Freebsd, but Freebs= d is running within our development environment and the version of Freebsd is not based on the current release.=20 hw.genet.tx_hdr_min does not exist in the Freebsd running in my development environment.=20 I can provide further details to help reproduce this issue. Let's say we wa= nt to send a large packet, e.x. "ping -s 2048 ....", and the packet is going to fragmented at the network layer, IP layer. For the first fragmented packet, the network header, ICMP header and a por= tion of payload are stored in one mbuf, and "M_EXT" macro is set at that mbuf ba= sed on the rule in the code. Therefore, the mbuf is not writeable. The link-lay= er header and statusblock will be prepended to a new mbuf inserted before the = mbuf carrying the "network header + ICMP header + payload". For reproducing the problem, it might not be necessary to send a large pack= et, but just make the mbuf not writable. --=20 You are receiving this mail because: You are on the CC list for the bug.=