Skip to content

fix failing tests due to IPv4-mapped IPv6 rejection in Go 1.24.8 - #42

Merged
JohnTitor merged 1 commit into
PuerkitoBio:masterfrom
syedazeez337:master
May 17, 2026
Merged

JohnTitor merged 1 commit into
PuerkitoBio:masterfrom
syedazeez337:master

Conversation

@syedazeez337

Copy link
Copy Markdown

Fixes #41. Closes the Debian bug https://bugs.debian.org/1118422.

The three failing test cases used IPv4-mapped IPv6 addresses (::ffff:192.168.1.1) which were rejected as invalid IPv6 host by Go 1.24.8. That release fixed CVE-2025-47912 by adding netip.ParseAddr validation inside parseHost, but the initial implementation was too broad — it caught IPv4-mapped IPv6 alongside the actual CVE target (plain [192.168.1.1]).

Go filed issue #75815 shortly after and the regression was fixed in Go 1.24.10. In Go 1.26.3 the check correctly uses addr.Is4(), which is false for ::ffff:192.168.1.1 (Is4In6()), so the original addresses pass again on current Go. But packages building against Go 1.24.8 or 1.24.9 hit the failure, which is what broke the Debian build.

The fix replaces the three IPv4-mapped addresses with 2001:db8::1 (RFC 3849 documentation range). The same normalization behaviours are covered — default port removal, scheme and host lowercasing — with no reliance on how Go handles this address class going forward.

Also updates the CI matrix from the stale 1.19/1.20/1.21 to 1.24/1.25/1.26. The old matrix would never have caught this.

Tested against Go 1.24.4, 1.24.8 (the broken version), and 1.26.3.

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JohnTitor
JohnTitor merged commit 3a38900 into PuerkitoBio:master May 17, 2026
3 checks passed
Maks1mS pushed a commit to stplr-dev/stplr that referenced this pull request May 17, 2026
This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [github.com/PuerkitoBio/purell](https://github.com/PuerkitoBio/purell) | require | patch | `v1.2.1` → `v1.2.2` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/PuerkitoBio/purell/badge)](https://securityscorecards.dev/viewer/?uri=github.com/PuerkitoBio/purell) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/23) for more information.

---

### Release Notes

<details>
<summary>PuerkitoBio/purell (github.com/PuerkitoBio/purell)</summary>

### [`v1.2.2`](https://github.com/PuerkitoBio/purell/releases/tag/v1.2.2)

[Compare Source](PuerkitoBio/purell@v1.2.1...v1.2.2)

#### What's Changed

- fix failing tests due to IPv4-mapped IPv6 rejection in Go 1.24.8 by [@&#8203;syedazeez337](https://github.com/syedazeez337) in [#&#8203;42](PuerkitoBio/purell#42)
- chore: introduce zizmor by [@&#8203;JohnTitor](https://github.com/JohnTitor) in [#&#8203;43](PuerkitoBio/purell#43)
- docs: update docs to reflect the latest info by [@&#8203;JohnTitor](https://github.com/JohnTitor) in [#&#8203;44](PuerkitoBio/purell#44)

#### New Contributors

- [@&#8203;syedazeez337](https://github.com/syedazeez337) made their first contribution in [#&#8203;42](PuerkitoBio/purell#42)

**Full Changelog**: <PuerkitoBio/purell@v1.2.1...v1.2.2>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday (`* 0-4,22-23 * * 1-5`)
  - Only on Sunday and Saturday (`* * * * 0,6`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzAuMjIiLCJ1cGRhdGVkSW5WZXIiOiI0My4xNzAuMjIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIktpbmQvRGVwZW5kZW5jaWVzIl19-->

Reviewed-on: https://altlinux.space/stapler/stplr/pulls/434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FTBFS: IPv4-mapped IPv6 addresses rejected as invalid by modern Go (net/url change)

2 participants