Coder Social home page Coder Social logo

scope docker doesn't work about appscope HOT 1 CLOSED

criblio avatar criblio commented on August 20, 2024
scope docker doesn't work

from appscope.

Comments (1)

iapaddler avatar iapaddler commented on August 20, 2024

the executable is dynamic. it presents as a Go exec as it includes several sections that identifies it as GO, including ".note.go.buildid".

when the library finds sections defining a Go exec it looks for the symbol "runtime.buildVersion". in this case, it finds the symbol and the address 0x0451a9c0. readelf confirms the symbol and address:
readelf -s /usr/bin/docker | grep buildVersion
106645: 000000000451a9c0 16 OBJECT GLOBAL DEFAULT 26 runtime.buildVersion
178064: 000000000451a9c0 16 OBJECT GLOBAL DEFAULT 26 runtime.buildVersion

the elf image defines that the symbol "runtime.buildVersion" is in the .data section and that the section is marked as LOAD.
from readelf (abbreviated):
LOAD 0x0000000002e74590 0x0000000002e75590 0x0000000002e75590
0x00000000017466b0 0x00000000017725b8 RW 0x1000
05 .init_array .fini_array .data.rel.ro .dynamic .got .data .go.buildinfo .noptrdata .bss .noptrbss

when the exec is loaded, addresses in the range defined for .data and .text are not mapped. therefore, a segfault results when referencing the defined address for "runtime.buildVersion".

taking the start load address as defined in the maps file and adding the value of the symbol defined for "runtime.buildVersion" results in an address that is in the mapped .data section.

so, we need to determine what is defining the load address and how to detect when we need to apply these values. will get back to this ASAP.

from appscope.

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.