3 ms·
Linux has the option of simply refusing your request and returning -ENOMEM. Is this an option for systemd?
by kccqzy 8y ago
Linux has the option of simply refusing your request and returning -ENOMEM. Is this an option for systemd?
- saagarjha 8y agoI don't see how this would help in this case? If systemd could detect it was going to overflow the stack, there's no vulnerability…
- kccqzy 8y agoI mean, if we avoid stack allocation, then perhaps we need to instead allocate on the heap. What if malloc fails then? Can systemd return an error code? Or do we instead have a DoS problem?
- saagarjha 8y ago> Linux has the option of simply refusing your request and returning -ENOMEM. Is this an option for systemd? > if we avoid stack allocation, then perhaps we need to instead allocate on the heap That's what the fix does: https://github.com/systemd/systemd/commit/f519a19bcd5afe674a9b8fc462cd77d8bad403c1#diff-88d4b05d65f1377f716024145dc65d16 https://github.com/systemd/systemd/commit/f519a19bcd5afe674a...