Skip to content

Conversation

@odeneriksson
Copy link

Hi there.

I couldn't build the latest version 1.2.2 on Fedora 42 and I asked ChatGPT for help and also asked to fix possible security issues and other enhancements. I guess we should have requested a CVE and agreed on an embargoe but this software isn't crucial like for example bash, sudo and those ones.

These changes needs to be reviewed by a software developer to verify if it's legit and valid or not.

It works for me on Fedora 42.

Cheers,

Sec-WebSocket-Key. Prefer gnutls_rnd when GNUTLS is enabled, otherwise
read from /dev/urandom and only fall back to rand() as a last resort.
This avoids predictable keys and aligns with RFC 6455 requirements.

Fix the previous change to use std::array correctly:
- Use rnd.data() instead of casting the whole array
- Use rnd.size() for length
Also add necessary includes. This ensures C++11 builds and avoids
invalid reinterpret_cast.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
an ALLOW_BROKEN_TLS macro (disabled by default). This avoids accepting
broken certificate chains in normal builds.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
- Set FD_CLOEXEC on created sockets.
- Apply O_CLOEXEC on both ends of socketpair.
This reduces risk of fd leaks across exec.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
in the child branch prior to execvp, using /proc/self/fd on Linux or a
getrlimit(RLIMIT_NOFILE) fallback elsewhere.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
<sys/resource.h> for getrlimit, and <cstdlib> for atoi.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
- Providing NO_EXTERNAL_CMD build-time switch to disable execution.
- Rejecting dangerous shell metacharacters before calling popen.
Note: For highest safety, prefer execvp with argv instead of shell.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
- Include <cstdint> to define uint8_t.
- Add bounds checks before accessing value[i+1] and value[i+2].
- Cast to unsigned in snprintf when emitting \u escapes.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
- Prefer gnutls_rnd when GNUTLS is enabled
- Otherwise read from /dev/urandom with a final rand() fallback
Add required headers so this compiles under C++11.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
queries so Fedora (and other distros) link correctly out of the box.

These changes were discovered by using ChatGPT and I take no credit for
the contributions. It builds and works under Red Hat Fedora 42.
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.

1 participant