Skip to content
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

Accessing a Service without any Endpoints made Windows Node crash #4990

Closed
tnqn opened this issue May 17, 2023 · 0 comments · Fixed by #4992
Closed

Accessing a Service without any Endpoints made Windows Node crash #4990

tnqn opened this issue May 17, 2023 · 0 comments · Fixed by #4992
Labels
area/OS/windows Issues or PRs related to the Windows operating system. area/proxy Issues or PRs related to proxy functions in Antrea kind/bug Categorizes issue or PR as related to a bug.

Comments

@tnqn
Copy link
Member

tnqn commented May 17, 2023

Describe the bug

If a Service has no available Endpoints, antrea-agent should send a reject response when a client accesses the Service IP, by generating a packet-out message to OVS. However, on Windows, generating the packet-out message with in_port set to CONTROLLER (0xfffffffd) triggers a bug in ovs-windows, leading to system crash.

STACK_TEXT:  
ffff9201`3c71ec38 fffff802`2beccdef : ffffc78c`34f85900 00000000`0000001f ffff9201`3c71ed40 ffff9201`3c71f070 : OVSExt!NlAttrGetBe32 [D:\repo\ovs_216_37\ovs\datapath-windows\ovsext\Netlink\Netlink.c @ 915] 
ffff9201`3c71ec40 fffff802`2bec5087 : ffffc78c`241a5630 fffff802`29b70a8b 00000000`c000000d 00000000`00010001 : OVSExt!OvsNlExecuteCmdHandler+0x1af [D:\repo\ovs_216_37\ovs\datapath-windows\ovsext\User.c @ 345] 
ffff9201`3c71ef70 fffff802`2bedf344 : 00000000`00000000 ffff9201`3c71f099 00000000`00010000 00000000`00000000 : OVSExt!InvokeNetlinkCmdHandler+0xa3 [D:\repo\ovs_216_37\ovs\datapath-windows\ovsext\Datapath.c @ 1132] 
ffff9201`3c71f020 fffff80c`77952c81 : ffffc78c`2165ba80 00000071`ddae2090 ffffc78c`2165b930 ffffc78c`40e50220 : OVSExt!OvsDeviceControl+0x314 [D:\repo\ovs_216_37\ovs\datapath-windows\ovsext\Datapath.c @ 1001] 
ffff9201`3c71f100 fffff802`29babc29 : ffffc78c`40e50220 00000000`00000000 ffff9200`3c71f261 ffffc78c`25933080 : NDIS!ndisDummyIrpHandler+0x91
ffff9201`3c71f130 fffff802`2a137841 : ffffc78c`40e50220 00000000`00000000 00000000`00000000 ffffc78c`3312cb20 : nt!IofCallDriver+0x59
ffff9201`3c71f170 fffff802`2a1120bc : ffff9201`3c71f4c0 00000000`00010000 ffff9201`20206f00 ffff9201`3c71f4c0 : nt!IopSynchronousServiceTail+0x1b1
ffff9201`3c71f220 fffff802`2a0b69f6 : 00000071`ddad1ff8 00000000`00000000 00000000`00000000 00000000`00000000 : nt!IopXxxControlFile+0xe0c
ffff9201`3c71f360 fffff802`29c83105 : 00000000`00000000 00000000`00000000 00000000`00000000 000001b0`7efc6280 : nt!NtDeviceIoControlFile+0x56
ffff9201`3c71f3d0 00007ffb`1235f844 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiSystemServiceCopyEnd+0x25
00000071`ddad1f38 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : 0x00007ffb`1235f844

The issue can also be reproduced by the following command that generates packet-out directly via ovs-ofctl:

# 4294967293 == 0xfffffffd
ovs-ofctl packet-out br-int 4294967293 'resubmit(,0)' ffffffffffff00010200000108060001080006040001000102000001c0a80001000000000000c0a80002

To Reproduce

Create a Service without any Endpoints and access its Service IP from Windows Pod. Or execute the above ovs-ofctl command to generate a packet-out message. The Windows Node would crash immediately.

Versions:

  • Antrea version (Docker image tag). v1.11.0, v1.11.1
@tnqn tnqn added area/OS/windows Issues or PRs related to the Windows operating system. kind/bug Categorizes issue or PR as related to a bug. area/proxy Issues or PRs related to proxy functions in Antrea labels May 17, 2023
@tnqn tnqn added this to the Antrea v1.12 release milestone May 17, 2023
tnqn added a commit to tnqn/antrea that referenced this issue May 17, 2023
CONTROLLER cannot be used as the in_port due to a bug in Windows ovsext
driver, otherwise the Windows OS would crash.

See openvswitch/ovs-issues#280.

Fixes antrea-io#4990

Signed-off-by: Quan Tian <qtian@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/OS/windows Issues or PRs related to the Windows operating system. area/proxy Issues or PRs related to proxy functions in Antrea kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant