Coder Social home page Coder Social logo

Comments (9)

stigtsp avatar stigtsp commented on August 12, 2024 1

Some context for the above: Added the patches from #40 that removes the state files feature to nixpkgs, and tests for all reverse dependencies ran fine.

Removing the state files seems like a reasonable fix to me, unless I'm missing something.

from data-uuid.

timretout avatar timretout commented on August 12, 2024

I have requested a CVE id from oss-security, and I will come back and update the report when one is assigned.

from data-uuid.

rjbs avatar rjbs commented on August 12, 2024

I really don't do anything on this library but apply patches. It's been without a dedicated maintainer almost since release. A patch for this issue would be appreciated.

from data-uuid.

karenetheridge avatar karenetheridge commented on August 12, 2024

We should really fix this. A lot of production code uses it.

from data-uuid.

eserte avatar eserte commented on August 12, 2024

Anyway, what's the intention of these /tmp/.UUID* files? Maybe performance is the reason --- but actually, if all file operations were removed from UUID.xs, then constructing a Data::UUID object and run create_str() once is faster than before, at least on my linux system.

from data-uuid.

rjbs avatar rjbs commented on August 12, 2024

I'm afraid I don't know. I really have never really read this code carefully. I have just been the de facto "apply patches, do test release, release afterward" person.

from data-uuid.

tecordes avatar tecordes commented on August 12, 2024

Hi, I'm new to github, but a dev of 30 years. I have attempted a fix of this issue as it drives me nuts. I have attempted to get my commit/patch to link to this issue, I think it worked? No idea what I have to do now.
Anyhow you can see my changes in my commit link. My idea is to change from using tmp to using ENV{HOME}, with a fallback to tmp. And some other minor related tweaks. It's all done in C in the XS, not in perl or the makefile.

from data-uuid.

briandfoy avatar briandfoy commented on August 12, 2024

I looked at the merged commit, and wonder if this is still insecure. The attacker can still chose to have the file created in /tmp by choosing the value for $HOME. The filenames are still completely known, which is a big part of the problem.

As Slavic said, get rid of the external file altogether so there's no problem with files.

Typically, I've seen these steps for dealing with temp file race conditions:

  • Add a varying and random part to the name. This should be hard to guess.
  • Fail if the file already exists.
  • Use lstat ensure that you have the file you think you do. Fail if you have a symlink.

from data-uuid.

stigtsp avatar stigtsp commented on August 12, 2024

from data-uuid.

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.