From: Cyril Hrubis <chrubis@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] syscalls/statmount07: change "invalid buffer size" test
Date: Tue, 15 Oct 2024 15:43:34 +0200 [thread overview]
Message-ID: <Zw5xhhvjNkvAwKU0@yuki.lan> (raw)
In-Reply-To: <CAASaF6w0Smez5e=hn8UGU2DC3Fi2zrqYX2PwKKE4r23RQ0BM4Q@mail.gmail.com>
Hi!
> Are you sure?
>
> 17019 08:32:23 write(2, "tst_buffers.c:57: \33[1;34mTINFO: "..., 66) = 66
> 17019 08:32:23 mmap(NULL, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3ff94f75000
> 17019 08:32:23 mprotect(0x3ff94f76000, 4096, PROT_NONE) = 0
>
> st_mount_bad: 0x3ff94f75fff
> (/proc/self/maps)
> ...
> 3ff94f2e000-3ff94f30000 rw-p 0002e000 fd:03 67110911
> /usr/lib/ld64.so.1
> 3ff94f75000-3ff94f76000 rw-p 00000000 00:00 0
> 3ff94f76000-3ff94f77000 ---p 00000000 00:00 0
> 3ff94f77000-3ff94f7b000 rw-p 00000000 00:00 0
> 3fffba5a000-3fffba7b000 rw-p 00000000 00:00 0 [stack]
> 3fffba9f000-3fffbaa1000 r--p 00000000 00:00 0 [vvar]
> 3fffbaa1000-3fffbaa3000 r-xp 00000000 00:00 0 [vdso]
>
> >, since guarded buffers are primarily guarding about off-by-one
> > at the start of the buffer.
>
> I'd expect going over end of buffer to be a lot more common.
Sigh, for some reason I had the case with PROT_NONE before the buffer
stored in my memory, maybe that was one of the versions the patchset
went through. Sorry for misleading reply.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-10-15 13:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 7:57 [LTP] [PATCH] syscalls/statmount07: drop "invalid buffer size" test Jan Stancek
2024-10-15 9:50 ` Cyril Hrubis
2024-10-15 10:10 ` Jan Stancek
2024-10-15 10:59 ` Cyril Hrubis
2024-10-15 11:51 ` Jan Stancek
2024-10-15 11:48 ` [LTP] [PATCH v2] syscalls/statmount07: change " Jan Stancek
2024-10-15 12:07 ` Cyril Hrubis
2024-10-15 12:41 ` Jan Stancek
2024-10-15 13:43 ` Cyril Hrubis [this message]
2024-10-15 13:54 ` Jan Stancek
2024-10-18 10:23 ` Petr Vorel
2024-10-18 10:25 ` Jan Stancek
2024-10-15 13:45 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zw5xhhvjNkvAwKU0@yuki.lan \
--to=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox