René's URL Explorer Experiment


Title: KVM: enable no-mac-spoofing on virtual nics by weizhouapache · Pull Request #8951 · apache/cloudstack · GitHub

Open Graph Title: KVM: enable no-mac-spoofing on virtual nics by weizhouapache · Pull Request #8951 · apache/cloudstack

X Title: KVM: enable no-mac-spoofing on virtual nics by weizhouapache · Pull Request #8951 · apache/cloudstack

Description: Description In shared, isolated networks and vpcs in advanced zone, user vms can easily perform ip/arp/mac spoofing by pretending to be another vm in the same network. change mac ip link set dev eth0 down ip link set dev eth0 address ip link set dev eth0 up change IP ip addr add dev eth0 ip addr del dev eth0 these can also be done by netplan/network-scripts configurations. libvirt has a network traffic filtering subsystem which can be used to prevent spoofing. (https://libvirt.org/formatnwfilter.html#concepts) It provides some pre-existing network filters (https://libvirt.org/formatnwfilter.html#pre-existing-network-filters), no-mac-spoofing is missed in the table. Ideally we should use clean-traffic, however, the IP/ARP anti-spoofing does not work in our testing, as the IP is not specified in the libvirt vm definition XML by cloudstack. libvirt can auto-detect the IP but the auto-detected IP is not always correct, for example, when user configures (wrong) static IP inside the user VM. This PR adds no-mac-spoofing for each nic to prevent mac spoofing. It could be an improvement PR to support all MAC/IP/ARP spoofing it might lead to some overhead. it is better to be configurable for guest network, network offering or account IP/network information needs to be added to the InterfaceDef for each type of interface (bridge, direct, network, vhostuser, etc). it might be not needed in advanced zone with security groups, as there are already iptables/ebtables/ipset rules to prevent the spoofings it needs some discussion and testing. clean-traffic is good, but it might not be what we want. we need to evaluate the pre-existing network filters and probably consider creating customized filters. refer to https://libvirt.org/firewall.html#the-network-filter-driver Types of changes Breaking change (fix or feature that would cause existing functionality to change) New feature (non-breaking change which adds functionality) Bug fix (non-breaking change which fixes an issue) Enhancement (improves an existing feature and functionality) Cleanup (Code refactoring and cleanup, that may add test cases) build/CI Feature/Enhancement Scale or Bug Severity Feature/Enhancement Scale Major Minor Bug Severity BLOCKER Critical Major Minor Trivial Screenshots (if appropriate): How Has This Been Tested? How did you try to break this feature and the system with this change?

Open Graph Description: Description In shared, isolated networks and vpcs in advanced zone, user vms can easily perform ip/arp/mac spoofing by pretending to be another vm in the same network. change mac ip link set dev ...

X Description: Description In shared, isolated networks and vpcs in advanced zone, user vms can easily perform ip/arp/mac spoofing by pretending to be another vm in the same network. change mac ip link set dev ...

Opengraph URL: https://github.com/apache/cloudstack/pull/8951

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9e84d7d9-1d97-e70b-d802-d29bc65e7167
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8FF2:13B1D:1BAA4DA:2701CAB:6A4CC656
html-safe-nonce5790f62eaa1630a91425a7d87c6de9f626676957f288fd59e5ea9f1c5abd492b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkYyOjEzQjFEOjFCQUE0REE6MjcwMUNBQjo2QTRDQzY1NiIsInZpc2l0b3JfaWQiOiIxNzQwMjg1NjQzMDU5OTM4OTAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac29574da71d70a197809552a9d858d47790792b0dc7de864f9c959e04374f847e
hovercard-subject-tagpull_request:1832117390
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/apache/cloudstack/pull/8951/files
twitter:imagehttps://avatars.githubusercontent.com/u/57355700?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/57355700?s=400&v=4
og:image:altDescription In shared, isolated networks and vpcs in advanced zone, user vms can easily perform ip/arp/mac spoofing by pretending to be another vm in the same network. change mac ip link set dev ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/apache/cloudstack git https://github.com/apache/cloudstack.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id9759448
octolytics-dimension-repository_nwoapache/cloudstack
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9759448
octolytics-dimension-repository_network_root_nwoapache/cloudstack
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released0da0eb92994395299ed4450bf67b0373005be36
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/pull/8951/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F8951%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F8951%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=apache%2Fcloudstack
Reloadhttps://github.com/apache/cloudstack/pull/8951/files
Reloadhttps://github.com/apache/cloudstack/pull/8951/files
Reloadhttps://github.com/apache/cloudstack/pull/8951/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/8951/files
apache https://github.com/apache
cloudstackhttps://github.com/apache/cloudstack
Notifications https://github.com/login?return_to=%2Fapache%2Fcloudstack
Fork 1.3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Star 3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Code https://github.com/apache/cloudstack
Issues 534 https://github.com/apache/cloudstack/issues
Pull requests 265 https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality 0 https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Code https://github.com/apache/cloudstack
Issues https://github.com/apache/cloudstack/issues
Pull requests https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fapache%2Fcloudstack%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fapache%2Fcloudstack%2Fissues%2Fnew%2Fchoose
weizhouapachehttps://github.com/weizhouapache
apache:4.22https://github.com/apache/cloudstack/tree/4.22
weizhouapache:4.20-kvm-no-mac-spoofinghttps://github.com/weizhouapache/cloudstack/tree/4.20-kvm-no-mac-spoofing
Conversation 24 https://github.com/apache/cloudstack/pull/8951
Commits 1 https://github.com/apache/cloudstack/pull/8951/commits
Checks 2 https://github.com/apache/cloudstack/pull/8951/checks
Files changed https://github.com/apache/cloudstack/pull/8951/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/8951/files
KVM: enable no-mac-spoofing on virtual nics https://github.com/apache/cloudstack/pull/8951/files#top
Show all changes 1 commit https://github.com/apache/cloudstack/pull/8951/files
5e0aa25 KVM: enable no-mac-spoofing on virtual nics weizhouapache Apr 19, 2024 https://github.com/apache/cloudstack/pull/8951/commits/5e0aa25e078e3f70e3a2846d9121786fbe2e6a20
Clear filters https://github.com/apache/cloudstack/pull/8951/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/8951/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/8951/files
LibvirtVMDef.java https://github.com/apache/cloudstack/pull/8951/files#diff-de5d8a4d3d85430fbef23e89c396be26b4a46186dcb5581e9cf127a89092ec34
LibvirtVMDefTest.java https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
LibvirtReplugNicCommandWrapperTest.java https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.javahttps://github.com/apache/cloudstack/pull/8951/files#diff-de5d8a4d3d85430fbef23e89c396be26b4a46186dcb5581e9cf127a89092ec34
View file https://github.com/apache/cloudstack/blob/5e0aa25e078e3f70e3a2846d9121786fbe2e6a20/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/8951/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/8951/files#diff-de5d8a4d3d85430fbef23e89c396be26b4a46186dcb5581e9cf127a89092ec34
https://github.com/apache/cloudstack/pull/8951/checks?check_run_id=37969870049
https://github.com/apache/cloudstack/pull/8951/files#diff-de5d8a4d3d85430fbef23e89c396be26b4a46186dcb5581e9cf127a89092ec34
...ins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.javahttps://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
View file https://github.com/apache/cloudstack/blob/5e0aa25e078e3f70e3a2846d9121786fbe2e6a20/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/8951/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
https://github.com/apache/cloudstack/pull/8951/files#diff-34d96612a53ff5026b69c0f3a5700d03af55a03da61182420743ec7cbcde68fa
...st/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtReplugNicCommandWrapperTest.javahttps://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
View file https://github.com/apache/cloudstack/blob/5e0aa25e078e3f70e3a2846d9121786fbe2e6a20/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtReplugNicCommandWrapperTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/8951/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
https://github.com/apache/cloudstack/pull/8951/files#diff-64ee9d5ee6b3f2ce671922fabb7f1285987543411e6ce4541079eb3b4c2cbbf3
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.