From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GTSpypCu; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 377345A004E for ; Mon, 03 Feb 2025 10:53:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738576422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/QqJrGRgIPaHXa6GgtMu1YO2i0gkthSze+VqniOI2GY=; b=GTSpypCujKSVs4jshE0Cni1AN9jK9HlMXgXCFj80rWT3HG0ZTlbPVhmUn6eV3eBmKtW3Ak LBFIV8zSSfDGNCdqfhsh7JcRoESVdbZ7uhtODmF0q9a1WivQLcg3pktifXJs/IbdZP7P+A KeUYSll06Q5JQd3Gp1v3vq/vtdlbSTs= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-437-fCH3J1Q4NUSTjYH6tXxYDg-1; Mon, 03 Feb 2025 04:53:40 -0500 X-MC-Unique: fCH3J1Q4NUSTjYH6tXxYDg-1 X-Mimecast-MFC-AGG-ID: fCH3J1Q4NUSTjYH6tXxYDg Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-aaf8f016bb1so449716666b.2 for ; Mon, 03 Feb 2025 01:53:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738576418; x=1739181218; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/QqJrGRgIPaHXa6GgtMu1YO2i0gkthSze+VqniOI2GY=; b=oe/2di1I3j9m6nLuI5k19c2glgxXFlDr6DuDOLpeH/TQlaxmxnvwuhSvfeyda0Gr6P thMAdg5f90gSZPjKgKniiQeNm/CIr0azEjw0kQiZtUhE0ZrvP5AX00c+fN6jwcCV7BgD 0XuST9iXkcbeu1vn3Haq8ZCAcZ/7kt3Ri8q0xtTzIuRymP8n7BAuGAcrjBcs/rjhTRby DhUmXJ1O4AIEiUdqsPI8M8+Rlh4AhuGcr1nkTM2Gek6z8MA0XQZKHDnIyFK3YI/dATHz hzUTo4ihZuDuQVVVM9r6cYbweJPUQSEA4Xk6+WC06bjgSYqeO2OhFBd+GVX0i7lDs+Sr DnGQ== X-Forwarded-Encrypted: i=1; AJvYcCVOAdVREtI/P9QF1qNLHYEWpXZU7Z6TB+FlY35DviLuTGNLDmXwpQlSQjehKiuj335x/ee2BeUu0Nc=@passt.top X-Gm-Message-State: AOJu0Yy5WoUJyzM8/w66e2tdFVdA/sz4jvjeEKjI21u2/o9AUy7YFw1m DJNh7Ur1SPOGXgrz07Fkc/1ZwO1diBL8IpZSBSDzbnhJ97OxaL41+rY81Xkl9nL9o/IcPaVABsZ Y3cilnY/AUPf65clVa7dytZCsxhFIRhL4xNyiGe5zWWO2803O5Z+nISbRitnXUbWSTx2E5edL7a RJJT5GRVWAppWyCG6dyQ+qfoqE1pU4YyCWt7g= X-Gm-Gg: ASbGncu0Cv8CIkgqp42LPQpDlrWoXDH1wAvNaGg67XpHjo4nxk+VvPOZd/jNY1SzTBT H+Y7LklqWebLsljOxiLche8QRzo+kV2yh+PnYX0L6YJwPal4rAcPPFRPokPn01g9ZYLHQRRpdLu v0P2+NszBC7qqdJByAX6NV X-Received: by 2002:a17:907:9413:b0:ab6:f59b:8323 with SMTP id a640c23a62f3a-ab6f59b833amr1870389666b.49.1738576418082; Mon, 03 Feb 2025 01:53:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2bMD9xurmcYm6MF1EVOGlyOa5X3u4HYcVfW7U7edyynHDaHSLA1K+wjgjWjlgwcdyzo4bEVboDvN3fk71how= X-Received: by 2002:a17:907:9413:b0:ab6:f59b:8323 with SMTP id a640c23a62f3a-ab6f59b833amr1870387166b.49.1738576417686; Mon, 03 Feb 2025 01:53:37 -0800 (PST) MIME-Version: 1.0 References: <20250131145329.1835558-1-ellorent@redhat.com> <20250201141330.59af1324@elisabeth> In-Reply-To: From: Enrique Llorente Pastora Date: Mon, 3 Feb 2025 10:53:26 +0100 X-Gm-Features: AWEUYZmZE41hTFv265AshGJ7xHeJq6uM-0NqtJ0-LZSS5UyCtrsa0ZwKYeolO4Y Message-ID: Subject: Re: [PATCH] dhcp: Don't re-use request message for reply To: David Gibson X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hIna5ZieOgSRgbemQ9Kl6WvBy3zqLUXoZQ7osJNT4C0_1738576419 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5LRQOTFXTPATFTL2WOTW5Z4C3QQVOXUD X-Message-ID-Hash: 5LRQOTFXTPATFTL2WOTW5Z4C3QQVOXUD X-MailFrom: ellorent@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Stefano Brivio , passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Feb 3, 2025 at 10:29=E2=80=AFAM David Gibson wrote: > > On Sat, Feb 01, 2025 at 02:13:30PM +0100, Stefano Brivio wrote: > > On Fri, 31 Jan 2025 15:53:29 +0100 > > Enrique Llorente wrote: > > > > > The logic composing the DHCP reply message is reusing the request > > > message to compose the it, this kind be problematic from a security > > > > Does "be problematic" imply "would be ... once we add longer options"? > > > > > context and may break the functionality. > > > > Which one? This is important to know for distribution maintainers and, > > ultimately, users. > > Right, as a general rule commit messages be specific and concrete > about what the problem they're address is. > This looks about right ? The logic composing the DHCP reply message is reusing the request message to compose it, future long options like FQDN may exceed the request message limit making it go beyond the lower bound. This change create a new reply message with a fixed options size of 308 and fill it in with proper fields from requests adding on top the gener= ated options, this way the reply lower bound does not depend on the request. > -- > David Gibson (he or they) | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au | minimalist, thank you, not the other wa= y > | around. > http://www.ozlabs.org/~dgibson --=20 Quique Llorente CNV networking Senior Software Engineer Red Hat EMEA ellorent@redhat.com @RedHat Red Hat Red Hat