DescriptionThe Linux client rewrite changed the file id to be a 16-byte XOR of the first page of the binary. This doesn't really work very well for Breakpad, since generally you'll dump the symbols, then strip the binaries, which will result in different IDs for stripped and unstripped binaries. I've revived some bits of the old code, which locates the .text section, but changed it to XOR the first 4k of that data instead of generating an MD5 hash. I've attempted to follow the guidelines for code that runs within the compromised process, the new code in file_id.cc that's shared uses the libc and syscall helpers, and doesn't do any allocation. The only thing I was unsure of was calling sys_mmap2 in LinuxDumper::ElfFileIdentifierForMapping. Is that ok? There isn't any other way to easily figure out where the text section starts, AFAICT. One other caveat is that you can't use this code as written to calculate a file ID of a binary of different word size than the binary you're running, so you can't use a 64-bit dump_syms to dump 32-bit binaries, for example. I don't have any pressing need for that particular configuration, but I thought I'd mention it. Patch Set 1 #
Total comments: 12
MessagesTotal messages: 7
|