Starting with 6.4.0, I am often getting this error when trying to install the Static Linux SDK. Thankfully I have a builder docker image, so it only has to succeed twice per Swift version.
This looks like swift-corelibs-foundation#5203. The default swift:6.4 image is Ubuntu 26.04 with libcurl 8.18.0, and with libcurl 8.11.0 or newer a URLSession crashes this way when it's released right after a request. There's a fix in review, swiftlang/swift-corelibs-foundation#5491, and I posted a repro and test results there.
Until it lands, the swift:6.4-noble image might work as a workaround: it has libcurl 8.5.0, and I couldn't get the crash there.