Skip to content

Conversation

@lblommesteyn
Copy link

Summary

  • cap the control/metrics Unix socket JSON payload size at 1 MiB so untrusted clients can’t force arbitrarily large allocations
  • add a checked u64 → usize conversion so bogus length prefixes fail fast with InvalidInput
  • cover the new behaviour with oversized_messages_are_rejected

Testing

  • cargo +1.88.0 test -p ntpd oversized_messages_are_rejected

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.49%. Comparing base (528e142) to head (e43a118).

Files with missing lines Patch % Lines
ntpd/src/daemon/sockets.rs 84.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2007      +/-   ##
==========================================
- Coverage   83.50%   83.49%   -0.02%     
==========================================
  Files          70       70              
  Lines       19315    19339      +24     
==========================================
+ Hits        16129    16147      +18     
- Misses       3186     3192       +6     
Flag Coverage Δ
fuzz-cookie_parsing_sound 0.41% <ø> (-0.05%) ⬇️
fuzz-duration_from_float 0.28% <ø> (ø)
fuzz-encrypted_client_parsing 7.59% <ø> (-0.15%) ⬇️
fuzz-encrypted_server_parsing 10.13% <ø> (-0.57%) ⬇️
fuzz-ipfilter 2.59% <ø> (ø)
fuzz-key_exchange_request_parsing 4.99% <ø> (-1.04%) ⬇️
fuzz-key_exchange_response_parsing 3.80% <ø> (-0.04%) ⬇️
fuzz-packet_keyset 5.86% <ø> (-0.10%) ⬇️
fuzz-packet_parsing_sound 6.32% <ø> (-1.99%) ⬇️
fuzz-record_encode_decode 4.68% <ø> (ø)
test-aarch64-apple-darwin 83.18% <84.00%> (+<0.01%) ⬆️
test-x86_64-unknown-linux-gnu 83.09% <84.00%> (+<0.01%) ⬆️
test-x86_64-unknown-linux-musl 83.09% <84.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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