History log of /freebsd-13.1/sys/sys/imgact_binmisc.h (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0
# 8c28aa5e 08-Nov-2020 Kyle Evans <[email protected]>

imgact_binmisc: limit the extent of match on incoming entries

imgact_binmisc matches magic/mask from imgp->image_header, which is only a
single page in size mapped from the first page of an image. O

imgact_binmisc: limit the extent of match on incoming entries

imgact_binmisc matches magic/mask from imgp->image_header, which is only a
single page in size mapped from the first page of an image. One can specify
an interpreter that matches on, e.g., --offset 4096 --size 256 to read up to
256 bytes past the mapped first page.

The limitation is that we cannot specify a magic string that exceeds a
single page, and we can't allow offset + size to exceed a single page
either. A static assert has been added in case someone finds it useful to
try and expand the size, but it does seem a little unlikely.

While this looks kind of exploitable at a sideways squinty-glance, there are
a couple of mitigating factors:

1.) imgact_binmisc is not enabled by default,
2.) entries may only be added by the superuser,
3.) trying to exploit this information to read what's mapped past the end
would be worse than a root canal or some other relatably painful
experience, and
4.) there's no way one could pull this off without it being completely
obvious.

The first page is mapped out of an sf_buf, the implementation of which (or
lack thereof) depends on your platform.

MFC after: 1 week

show more ...


# 7d3ed977 07-Nov-2020 Kyle Evans <[email protected]>

imgact_binmisc: validate flags coming from userland

We may want to reserve bits in the future for kernel-only use, so start
rejecting any that aren't the two that we're currently expecting from
user

imgact_binmisc: validate flags coming from userland

We may want to reserve bits in the future for kernel-only use, so start
rejecting any that aren't the two that we're currently expecting from
userland.

MFC after: 1 week

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0
# 9b10f59a 13-Dec-2017 Pedro F. Giffuni <[email protected]>

SPDX: mostly fixes to previous changes.

Introduce the recently approved BSD-1-Clause and replace 0BSD which
never did fit well our use cases.


Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0
# ca4aaf23 03-May-2016 Pedro F. Giffuni <[email protected]>

sys/sys: missed in r298981.

I am sure I've missed others as well, but at least it should
be more readable now.

No functional change.


# 7f417bfa 03-May-2016 Pedro F. Giffuni <[email protected]>

sys/sys: minor spelling fixes.

While the changes are minor, these headers are very visible.

MFC after: 2 weeks


Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0
# b888dae4 08-Apr-2014 Sean Bruno <[email protected]>

sys/kern/imgact_binmisc.c -- free the right pointer mask vs magic

sys/sys/imagact_binmisc.h -- cleanup white space tabs vs spaces
-- remove stray " in comment

Submitted by

sys/kern/imgact_binmisc.c -- free the right pointer mask vs magic

sys/sys/imagact_binmisc.h -- cleanup white space tabs vs spaces
-- remove stray " in comment

Submitted by: jmallett@

show more ...


# 6d756449 08-Apr-2014 Sean Bruno <[email protected]>

Add Stacey Son's binary activation patches that allow remapping of
execution to a emumation program via parsing of ELF header information.

With this kernel module and userland tool, poudriere is abl

Add Stacey Son's binary activation patches that allow remapping of
execution to a emumation program via parsing of ELF header information.

With this kernel module and userland tool, poudriere is able to build
ports packages via the QEMU userland tools (or another emulator program)
in a different architecture chroot, e.g. TARGET=mips TARGET_ARCH=mips

I'm not connecting this to GENERIC for obvious reasons, but this should
allow the kernel module to be built by default and enable the building
of the userland tool (which automatically loads the kernel module).

Submitted by: sson@
Reviewed by: jhb@

show more ...