Giter VIP home page Giter VIP logo

Comments (4)

zkabelac avatar zkabelac commented on August 15, 2024

Hi

It's true that using 'sizeof(vgid) - 1' or ID_LEN would be sufficient here,
but I can't imagine how it can cause any crashing of your app ???

Still the buffer is sized as ID_LEN+1 and '\0' is written after the call strncpy().

Can you rather share you 'coredump' trace or at least -vvvv log
before your execution crashes - as it looks like reason might be somewhere else.

from lvm2.

adamboardman avatar adamboardman commented on August 15, 2024

The write side is fine as you say, its the read from vg->id.uuid that whilst is normally fine, it reads an extra byte which is later overwritten. In the specific case of running within the android recovery context (which enforces the use of FORTIFY) does a test on both the read and write side of strncpy and so causes the crash.

from lvm2.

zkabelac avatar zkabelac commented on August 15, 2024

Ahh ok - so it's purely crashing your enforced fortified build - not a normal build - since the access is normally embedded into a volume_group structure so it should not cause any troubles.
I'll push minor change later on.

from lvm2.

zkabelac avatar zkabelac commented on August 15, 2024

Changed upstream with this commit:
https://listman.redhat.com/archives/lvm-devel/2021-August/msg00016.html

from lvm2.

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.