RDKCOM-5501: RDKBDEV-3351 Fix for EDNS package size incorrect, CVE-2023-28450#192
RDKCOM-5501: RDKBDEV-3351 Fix for EDNS package size incorrect, CVE-2023-28450#192owen-lu-sercomm wants to merge 2 commits into
Conversation
8bf115f to
944d4f5
Compare
944d4f5 to
b354aa0
Compare
SanthoshGujulvajagadeesh
left a comment
There was a problem hiding this comment.
-P option should be set to 1232 instead of 4096 since the dnsmasq version currently used is 2.83 which doesn't set default EDNS UDP packet size to 1232.
'-P 4096' needs to be replaced with '-P 1232' in many places.
d55306a to
6a6be70
Compare
|
@SanthoshGujulvajagadeesh |
|
@AkhilaReddyK7 Need to know for which platforms this change is applicable |
GoutamD2905
left a comment
There was a problem hiding this comment.
Requested DevQA Tina to validate the test procedure shared in RDKCOM-5501
|
@GoutamD2905 Could you please check the test results? |
7632fc7 to
d7087ff
Compare
|
Could you please add the pack size changes under the non-Comcast platform–specific flag, as shown in the code below? CC : @tinaelizabeth84 |
|
@GoutamD2905 , I have added non-Comcast platform–specific flag, please help review |
|
Thanks for your patience. We discussed this internally with the component owners , and they’re aligned on accepting this as a generic change without any vendor-specific conditional flag. One suggestion from them is to add a new Custom RFC parameter for the packet size, with the default set to 1232, so we can adjust it at runtime if any issues are observed in field deployments. Please let us know if you have any question or concern . CC @anoopchelakkode , @snayak002c , @sshriv323 , @SanthoshGujulvajagadeesh , @GoutamD2905 |
|
📋 PR Format Reminder
Expected: |
There was a problem hiding this comment.
Pull request overview
Adjusts dnsmasq startup parameters in the DHCP/DNS service script to address the incorrect default EDNS.0 UDP packet size (per DNS Flag Day 2020 / CVE context).
Changes:
- Reads
PartnerIDand anedns_packet_sizesyscfg value when starting dnsmasq in the non-XDNS path. - Defaults EDNS packet size to
1232for non-Comcast partners, while keeping4096for Comcast.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PARTNER_ID=$(syscfg get PartnerID) | ||
| EDNS_PACKET_SIZE=$(syscfg get edns_packet_size) | ||
| EDNS_PACKET_SIZE=${EDNS_PACKET_SIZE:-1232} | ||
| if [ "$PARTNER_ID" != "comcast" ]; then | ||
| $SERVER -P $EDNS_PACKET_SIZE -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| else | ||
| $SERVER -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| fi |
| if [ "$PARTNER_ID" != "comcast" ]; then | ||
| $SERVER -P $EDNS_PACKET_SIZE -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| else | ||
| $SERVER -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| fi |
| PARTNER_ID=$(syscfg get PartnerID) | ||
| EDNS_PACKET_SIZE=$(syscfg get edns_packet_size) | ||
| EDNS_PACKET_SIZE=${EDNS_PACKET_SIZE:-1232} | ||
| if [ "$PARTNER_ID" != "comcast" ]; then | ||
| $SERVER -P $EDNS_PACKET_SIZE -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| else | ||
| $SERVER -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| fi |
| if [ "$PARTNER_ID" != "comcast" ]; then | ||
| $SERVER -P $EDNS_PACKET_SIZE -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| else | ||
| $SERVER -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| fi |
…for the packet size,add default syscfg edns_packet_size=1232. CVE-2023-28450 Reason for change: Add an RFC option to control the EDNS packet size. Test Procedure: 1. Capture packages on lan client 2. Send query with edns from lan client 3. Check the UDP payload size in the Additional records in DNS response package, which should be 1232 instead of 4096 4. set Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.EDNSPacketSize to 1800 5. Send query with edns from lan client 6. Check the UDP payload size in the Additional records in DNS response package, which should be 1800 Risks: Low Priority:P3 Signed-off-by: Owen Lu <owen_lu@sercomm.com>
48a2d9a to
b92272e
Compare
| #Edns Packet Size | ||
| $edns_packet_size=1232 |
| #Edns Packet Size | ||
| $edns_packet_size=1232 |
| #Edns Packet Size | ||
| $edns_packet_size=1232 |
…for the packet size. CVE-2023-28450 Reason for change: Add an RFC option to control the EDNS packet size. Test Procedure: 1. Capture packages on lan client 2. Send query with edns from lan client 3. Check the UDP payload size in the Additional records in DNS response package, which should be 1232 instead of 4096 4. set Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.EDNSPacketSize to 1800 5. Send query with edns from lan client 6. Check the UDP payload size in the Additional records in DNS response package, which should be 1800 Risks: Low Signed-off-by: Owen Lu <owen_lu@sercomm.com>
| PARTNER_ID=$(syscfg get PartnerID) | ||
| EDNS_PACKET_SIZE=$(syscfg get edns_packet_size) | ||
| EDNS_PACKET_SIZE=${EDNS_PACKET_SIZE:-1232} | ||
| if [ "$PARTNER_ID" != "comcast" ]; then | ||
| $SERVER -P $EDNS_PACKET_SIZE -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| else | ||
| $SERVER -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus | ||
| fi |
Reason for change:
An issue was discovered in Dnsmasq before 2.90. The default maximum EDNS.0 UDP packet size was set to 4096 but should be 1232 because of DNS Flag Day 2020.
Test Procedure:
Risks: Low
Signed-off-by: Owen Lu owen_lu@sercomm.com