-
Notifications
You must be signed in to change notification settings - Fork 359
gossip: fix DoS with malformed UDP header value/size #7146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Performance Measurements ⏳
|
jherrera-jump
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also update
firedancer/src/disco/gui/fd_gui_peers.c
Line 217 in 548c705
| + fd_gui_sum_tiles_counter( peers, "gossvf", gossvf_tile_cnt, MIDX( COUNTER, GOSSVF, MESSAGE_RX_BYTES_DROPPED_UNPARSEABLE) ) |
src/discof/gossip/fd_gossvf_tile.c
Outdated
| fd_ip4_hdr_t * ip4_hdr; | ||
| fd_udp_hdr_t * udp_hdr; | ||
| FD_TEST( fd_ip4_udp_hdr_strip( ctx->payload, sz, &payload, &payload_sz, NULL, &ip4_hdr, &udp_hdr ) ); | ||
| if( FD_UNLIKELY(!fd_ip4_udp_hdr_strip( ctx->payload, sz, &payload, &payload_sz, NULL, &ip4_hdr, &udp_hdr )) ) return FD_METRICS_ENUM_GOSSVF_MESSAGE_OUTCOME_V_DROPPED_MALFORMED_PACKET_IDX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this reachable? The net tile will not pass the packet to gossvf if the header is not valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The XDP tile does not check all this, see the PoC in https://github.com/firedancer-io/auditor-internal/issues/334
mmcgee-jump
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
credits for finding this to Immunefi user `@bpop23293`
a88c593 to
75b8d46
Compare
Performance Measurements ⏳
|
credits for finding this to Immunefi user
@bpop23293