Any client can crash hyprland by truncating fd buffers (Lack of SIGBUS handling)

Because clients can always truncate buffers after providing them over a file descriptor, it is necessary to install SIGBUS handler when reading from client provided buffers (see https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/types/wlr_shm.c?ref_type=heads#L179 for wlroots, and https://github.com/Smithay/smithay/blob/13333624f878a1cee3fb4ec6a041f0896913570f/src/wayland/shm/pool.rs#L338 for smithay version of this check.

Without this check any misbehaving client is able to crash the entire hyprland process.

How to reproduce

See the weston bad_buffer test https://gitlab.freedesktop.org/wayland/weston/-/blob/main/tests/bad-buffer-test.c?ref_type=heads for an example client setup that can induce a SIGBUS in a compositor.

This issue undermines any protection that the os attempts to apply e.g. if using an lsm or unshare etc. to prevent child processes from issuing SIGKILL to the compositor process i.e. a child can trivially subvert that restriction and crash hyprland.