Page MenuHomeFreeBSD

imgact_aout: Widen the overflow check in exec_aout_imgact()
AcceptedPublic

Authored by markj on Fri, Sep 25, 4:28 PM.
Tags
None
Referenced Files
F173758867: D60027.id187770.diff
Mon, Sep 28, 4:47 AM
F173730051: D60027.id187689.diff
Mon, Sep 28, 12:13 AM
F173728331: D60027.diff
Sun, Sep 27, 11:59 PM
F173728322: D60027.id187770.diff
Sun, Sep 27, 11:59 PM
F173663874: D60027.diff
Sun, Sep 27, 1:54 PM
Unknown Object (File)
Sun, Sep 27, 1:13 AM
Unknown Object (File)
Sun, Sep 27, 1:00 AM
Unknown Object (File)
Sat, Sep 26, 9:22 PM
Subscribers

Details

Reviewers
kib
Summary

I suspect this overflow check isn't needed at all, at least today, since
vm_map_insert() will detect wraparound when it creates segments (and
even a check against UINT_MAX is too loose, since the max user address
is AOUT32_USRSTACK == 0xbfc00000). But if we're going to keep this
check, there doesn't seem to be any downside to applying it on all
platforms, before exec_new_vmspace() tears down the current vmspace.

Reported by: Muhammed Sariyildiz <asiyee994@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77362
Build 74245: arc lint + arc unit

Event Timeline

markj requested review of this revision.Fri, Sep 25, 4:28 PM
kib added inline comments.
sys/kern/imgact_aout.c
238–239

Don't we want the same uint64_t cast there as well?

241–245

Add () != 0 since you are changing the line anyway.

This revision is now accepted and ready to land.Fri, Sep 25, 6:32 PM
markj marked 2 inline comments as done.

Handle feedback

This revision now requires review to proceed.Sat, Sep 26, 7:24 PM
This revision is now accepted and ready to land.Sat, Sep 26, 7:25 PM