[klibc] [PATCH 1/2] loop: fix loop_info struct
Ben Hutchings
ben at decadent.org.uk
Fri Nov 1 07:27:30 PDT 2019
On Thu, 2019-10-31 at 22:59 +0000, Dimitri John Ledkov wrote:
> Otherwise, stack can be corrupted resulting in incorrect runtime
> behaviour. For example, overriding argc from main().
The structure definition doesn't match the kernel's definition (on most
architectures) which leads to undefined behaviour. The commit message
should say something like that rather than specifying some particular
behaviour that was observed.
Ben.
> References: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/1850184
> Signed-off-by: Michael Hudson-Doyle <michael.hudson at ubuntu.com>
> Signed-off-by: Adam Conrad <adconrad at ubuntu.com>
> Signed-off-by: Dimitri John Ledkov <xnox at ubuntu.com>
> ---
> usr/utils/loop.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/usr/utils/loop.h b/usr/utils/loop.h
> index 9abc2874..667f7dc0 100644
> --- a/usr/utils/loop.h
> +++ b/usr/utils/loop.h
> @@ -15,9 +15,9 @@
>
> struct loop_info {
> int lo_number;
> - dev_t lo_device;
> + __kernel_old_dev_t lo_device;
> unsigned long lo_inode;
> - dev_t lo_rdevice;
> + __kernel_old_dev_t lo_rdevice;
> int lo_offset;
> int lo_encrypt_type;
> int lo_encrypt_key_size;
--
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zytor.com/archives/klibc/attachments/20191101/c0ff498d/attachment.sig>
More information about the klibc
mailing list