3 ms·
Why can't an attacker just link a new getenv() that pretends that LD_PRELOAD and other variables aren't set?
by bdowling 3y ago
Why can't an attacker just link a new getenv() that pretends that LD_PRELOAD and other variables aren't set?
- a-dub 3y agoLOL
- vhcr 3y agoYou could also modify the source code to remove the check, I'm guessing this is just for people that are accidentally setting LD_PRELOAD.
- zX41ZdbW 3y agoIt is mostly to protect from unusual configurations rather than protecting from an attacker, e.g., https://github.com/ClickHouse/ClickHouse/issues/43933 https://github.com/ClickHouse/ClickHouse/issues/43933 and https://github.com/ClickHouse/ClickHouse/issues/10505 https://github.com/ClickHouse/ClickHouse/issues/10505
- wyldfire 3y agoIt almost seems like it gives credence to self-inflicted problems by implementing changes like that. The creativity of people to break things by misusing them is unbound. Fix your bugs, fix non-bugs that seem like "foreseeable misuse". Don't fix "my users are in outer space" non-bugs.
- GuB-42 3y agoThis is so wrong... Why the fuck do Azure and Google Collab mess with LD_PRELOAD. Why do Clickhouse crashes when it does? Does it rely on unspecified behavior or are the preload libraries problematic? Is the preloaded library buggy? It looks like an arms race where stome piece of software forces use of a particular version of library instead of using what's in the system (but not static linking), then someone else use LD_PRELOAD to force back the use of the system library, and then other software ban LD_PRELOAD to counter the counter. I understand that some ugly things are sometimes needed to make software work, but think of the collateral damage.