From: "Pavel V. Panteleev" <panteleev_p@mcst.ru>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: copy_mount_options() problem
Date: Wed, 16 Oct 2019 10:31:06 +0300 [thread overview]
Message-ID: <5DA6C73A.4010809@mcst.ru> (raw)
In-Reply-To: <20191015184034.GN26530@ZenIV.linux.org.uk>
# tracer: nop
#
# entries-in-buffer/entries-written: 3/3 #P:16
#
# _-----=> irqs-off
# / _----=> need-resched
# |/ _-----=> need-resched_lazy
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# |||| / _-=> preempt-lazy-depth
# ||||| / _-=> migrate-disable
# |||||| / delay
# TASK-PID CPU# ||||||| TIMESTAMP FUNCTION
# | | | ||||||| | |
automount-5999 [001] ....... 170.320000: 0:
copy_mount_options(): copy 0xd017d560b000 data 0xc2dfffffe340 size
0x1000 USER_DS 0xc2dffffff000 TASK_SIZE 0xd00000000000
automount-5999 [001] ....... 170.320000: :
exact_copy_from_user(): !access_ok
automount-5999 [001] ....... 170.320000: :
copy_mount_options(): return -EFAULT
On 15.10.2019 21:40, Al Viro wrote:
> On Tue, Oct 15, 2019 at 09:09:02PM +0300, Pavel V. Panteleev wrote:
>> Hello,
>>
>> copy_mount_options() checks that data doesn't cross TASK_SIZE boundary. It's
>> not correct. Really it should check USER_DS boudary, because some archs have
>> TASK_SIZE not equal to USER_DS. In this case (USER_DS != TASK_SIZE)
>> exact_copy_from_user() will stop on access_ok() check, if data cross
>> USER_DS, but doesn't cross TASK_SIZE.
> Details of the call chain, please.
>
>
next prev parent reply other threads:[~2019-10-16 7:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 18:09 copy_mount_options() problem Pavel V. Panteleev
2019-10-15 18:40 ` Al Viro
2019-10-15 22:03 ` Al Viro
2019-10-16 7:39 ` Pavel V. Panteleev
2019-10-16 7:31 ` Pavel V. Panteleev [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-10-15 15:12 Pavel V. Panteleev
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=5DA6C73A.4010809@mcst.ru \
--to=panteleev_p@mcst.ru \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).