Coder Social home page Coder Social logo

Comments (4)

xxu36 avatar xxu36 commented on August 25, 2024

@binxing Hi Cedric, I agree that the TCP port or Vsock are open so another user can utilize that to talk to acond. Of course, acond has many verification steps to possibly detect it, but this is still a possible DoS attack.

However, as for totally shutting down the VM, a user other than the one created the VM is not able to kill the VM. In the code of aconcli, VM shut down logic is currently implemented by sending the SIGTERM signal to the VM process. So if the user attempting to kill the VM is not the one who created it, he is not permitted to shutdown the VM or even list the status of this VM.

I did an experiment trying to shutdown a VM created by xiangquan:
[sgx@sgx-emr01 xxu36]$ ./aconcli shutdown -f tcp://:1025
Shutdown: cannot get VM pid for tcp://:1025: get pid for (tcp://:1025): cannot get matching pid
Similar result as trying to kill the VM process directly by kill command
[sgx@sgx-emr01 xxu36]$ kill -TERM 1383098
-bash: kill: (1383098) - Operation not permitted

from acon.

binxing avatar binxing commented on August 25, 2024

@xxu36 You are right that an unauthorized user cannot kill the QEMU process, but he/she can stop containers, and after all containers are stopped, acond will time out and shut down QEMU.

Anyway, by forwarding host UNIX socket to guest TCP port, we can solve this problem cleanly.

I'm not sure how acond can tell who the user is. It will be able to authenticate the user with OpenID, but not before it is implemented.

from acon.

binxing avatar binxing commented on August 25, 2024

QEMU doesn't look like supporting this option. Let's delay the fix until we have OpenID authentication.

from acon.

binxing avatar binxing commented on August 25, 2024

This issue has been addressed by OpenID authentication added in v0.2.0.

from acon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.