Skip to content

updateNetworkACLItem with partialupgrade=false leaves a rule broken when cidrlist or traffictype is left out, and drops an ICMP type given with tcp #14642

Open

Description

@bhouse-nexthop

problem

updateNetworkACLItem with partialupgrade=false replaces every field of the rule with what the call passes. Two cases go wrong.

1. A field left out is written as null, and the rule is left broken.

When cidrlist or traffictype is left out, transferDataToNetworkAclRulePojo() sets them to null. NetworkACLItemDaoImpl.update() then writes the rule row and only afterwards updates the CIDRs, outside a transaction:

  • with cidrlist left out, NetworkACLItemCidrsDaoImpl.updateCidrs() fails with Cannot invoke "java.util.List.size()" because "cidrs" is null. The call fails, but the row has already been committed with the null traffic type.
  • from then on listNetworkACLs for that list fails with Cannot invoke "...TrafficType.toString()" because ... getTrafficType() is null, and applying the list fails the same way in SetNetworkACLCommand, until the rule is updated again with every field.

When protocol is left out, the call fails earlier with a NullPointerException in updateIcmpCodeAndTypeFullUpgrade(). Nothing is written in that case, but the error is an NPE rather than a message. (#14046 removes that NPE; the rule would then be saved without a protocol, which createNetworkACL never allows.)

action left out is already handled: it becomes Allow, as on create.

2. An ICMP type or code given with another protocol is silently dropped.

partialupgrade=false protocol=tcp icmptype=8 is accepted, and the rule is saved as tcp without the ICMP type. createNetworkACL with the same parameters, and the same update with the default partialupgrade=true, both refuse it with "Can specify icmpCode and icmpType for ICMP protocol only".

versions

4.20 and later for the dropped ICMP type; the null fields since partialupgrade was added in 4.12. Seen on 4.22 and main.

The steps to reproduce the bug

  1. In a VPC, create an ACL list and a rule on it: createNetworkACL aclid=<list> protocol=tcp startport=80 endport=80 cidrlist=10.1.2.0/24 action=allow traffictype=ingress.
  2. updateNetworkACLItem id=<rule> partialupgrade=false protocol=udp startport=53 endport=53. It fails with the cidrs is null NPE.
  3. listNetworkACLs aclid=<list> now fails with the getTrafficType() is null NPE.
  4. updateNetworkACLItem id=<rule> partialupgrade=false protocol=tcp cidrlist=10.1.2.0/24 action=allow traffictype=ingress repairs it.
  5. On an ICMP rule, updateNetworkACLItem id=<rule> partialupgrade=false protocol=tcp icmptype=8 cidrlist=10.1.2.0/24 action=allow traffictype=ingress is accepted, and the rule is tcp with no ICMP type.

What to do about it?

  • With partialupgrade=false, refuse the call when protocol, cidrlist or traffictype is missing, before anything is written. Defaulting them as create does would silently widen a rule to every address, or turn an egress rule into an ingress rule.
  • Refuse an invalid traffictype on update, as create does, instead of ignoring it.
  • Keep an ICMP type or code given with another protocol, so that the existing validation refuses it.
  • Write the rule row and its CIDRs in one transaction, so that a failure on the CIDRs can't leave the rule half updated.

Activity

  1. github-actions commented on Nov 10, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    updateNetworkACLItem with partialupgrade=false writes missing fields as null. With cidrlist or traffictype omitted, the rule row is saved before the CIDR update fails. That leaves listNetworkACLs failing for the whole list until the rule is fixed. A missing protocol gives an NPE. An ICMP type given with protocol=tcp is silently dropped, while createNetworkACL refuses it.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Partial update corrupts rule data
    Component component:api, component:vpc updateNetworkACLItem and VPC ACL storage
    Severity Severity:Major One update can break listNetworkACLs for the whole list
    Labels type:bug, component:api, component:vpc, Severity:Major
    Coding agent Suitable Fixes are listed: refuse missing required fields, keep ICMP validation, write in one transaction

    🔗 Similar issues

    💡 Notes and suggestions

    Generated by Daily Issue Triage · copilot · haiku55 · ~5 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
  2. added this to the 4.20.4 milestone on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions