Summary: | security idea: DEBUGINFOD_VERIFY mode | ||
---|---|---|---|
Product: | elfutils | Reporter: | Frank Ch. Eigler <fche> |
Component: | debuginfod | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | elfutils-devel, fweimer, vt, zbyszek |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Frank Ch. Eigler
2021-04-20 15:22:40 UTC
I don't think this protection is particularly interesting. Normal file system permissions should be used to safeguard any files in the home directory. I don't see a reason to try to add a verification layer on top. And if it was added, it cannot be effective anyway. Yeah. It may comfort those who are worried about the integrity of their previously downloaded cached files, but is not robust against local attacker who currently has control over the filesystem or processes. Instead of `X-Debuginfod-Hash` you can use `ETag` where you can put anything including sha256 (can be prescribed in webapi description), then GET request with `If-None-Match` + tag value (which is a hash) will return just 304 if the hash is not changed. So HEAD request is not needed too. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match And it should be possible to use the Content-Length header to verify that the data does not have an excessive size (something that is not possible with just the hash itself). (In reply to Vitaly Chikunov from comment #3) > Instead of `X-Debuginfod-Hash` you can use `ETag` where you can put anything > including sha256 (can be prescribed in webapi description), then GET request > with `If-None-Match` + tag value (which is a hash) will return just 304 if > the hash is not changed. So HEAD request is not needed too. That's a good idea, except in the case of an older [current] debuginfod that doesn't understand If-None-Match, and would just resend the entire content every time. But at least it's not a security problem, just a performance one. putting idea on ice |