NetBSD Problem Report #58891

From www@netbsd.org  Wed Dec 11 04:18:06 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5E3BA1A923C
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Dec 2024 04:18:06 +0000 (UTC)
Message-Id: <20241211041805.55BE01A923D@mollari.NetBSD.org>
Date: Wed, 11 Dec 2024 04:18:05 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: `make distinfo` skips TLS verification for many fetch methods
X-Send-Pr-Version: www-1.0

>Number:         58891
>Category:       pkg
>Synopsis:       `make distinfo` skips TLS verification for many fetch methods
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 11 04:20:01 +0000 2024
>Closed-Date:    Thu Dec 26 20:23:36 +0000 2024
>Last-Modified:  Thu Dec 26 20:25:00 +0000 2024
>Originator:     coypu
>Release:        pkgsrc-current in December 2024
>Organization:
The --insecureBSD Foundation
>Environment:
NetBSD planets 10.99.11 NetBSD 10.99.11 (GENERIC) #0: Wed Jul 10 20:09:01 EDT 2024  fly@planets:/data/cvs/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
When fetching with curl, tls verification is skipped (--insecure flag is passed in fetch.mk)

FETCH_USING=curl url2pkg "https://expired.badssl.com/index.html"; echo $?

This succeeds, it shouldn't, and it doesn't if FETCH_USING=ftp (on NetBSD)

This is a problem as during `make distinfo`, no other forms of validation exist.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 26 Dec 2024 20:23:36 +0000
State-Changed-Why:
Committed a fix.


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58891 CVS commit: pkgsrc/mk/fetch
Date: Thu, 26 Dec 2024 20:23:07 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Thu Dec 26 20:23:07 UTC 2024

 Modified Files:
 	pkgsrc/mk/fetch: fetch.mk

 Log Message:
 Validate TLS when fetching.

 This is not a security issue for users of pkgsrc as any downloaded files
 are checked against a checksum, but it is for developers are updating a
 package and generating the checksum for the first time.

 We know this is a safe change to make as some bulk builds are already
 running with TLS verification (e.g. the default fetch method on NetBSD 10
 validates TLS, and there aren't issues shown by bulk builds).

 If an upstream has TLS errors, we can work around it using
 `make upload-distfiles`, which will upload it to our local distfile mirror,
 and is a default fallback.

 PR pkg/58891


 To generate a diff of this commit:
 cvs rdiff -u -r1.79 -r1.80 pkgsrc/mk/fetch/fetch.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.