From: Jiri Slaby <jslaby@suse.com>
To: Or Cohen <orcohen@paloaltonetworks.com>
Cc: Nicolas Pitre <nico@fluxnic.net>,
Greg KH <gregkh@linuxfoundation.org>,
textshell@uchuujin.de, Daniel Vetter <daniel.vetter@ffwll.ch>,
sam@ravnborg.org, mpatocka@redhat.com, ghalat@redhat.com,
linux-kernel@vger.kernel.org, jwilk@jwilk.net,
Nadav Markus <nmarkus@paloaltonetworks.com>,
syzkaller@googlegroups.com
Subject: Re: Bug report - slab-out-of-bounds in vcs_scr_readw
Date: Tue, 5 Nov 2019 10:14:01 +0100 [thread overview]
Message-ID: <a0550a96-a7db-60d7-c4ac-86be8c8dd275@suse.com> (raw)
In-Reply-To: <CAM6JnLe88xf8hO0F=_Ni+irNt40+987tHmz9ZjppgxhnMnLxpw@mail.gmail.com>
On 05. 11. 19, 10:03, Or Cohen wrote:
> @Nicolas Pitre - I agree with you, "vcs_size" may return a negative
> error code, so the patch is correct but as @jslaby@suse.com said it
> won't fix the issue.
> In my debugging session, "vcs_size" returns a positive integer ( 8000
> decimal ) and the bug still triggers.
>
> Maybe it's related to the following logic in "vcs_size"? ( not sure
> about that.. )
>
> 221 if (use_attributes(inode)) {
> 222 if (use_unicode(inode))
> 223 return -EOPNOTSUPP;
> 224 size = 2*size + HEADER_SIZE;
> 225 } else if (use_unicode(inode))
> 226 size *= 4;
> 227 return size;
>
> Why in the case of "use_unicode(inode)" size is multiplied by 4 and
> not 2? ( as we can see in line 224 )
Because unicode uses 4 bytes. The issue is that there is no handling for
unicode in vcs_write at all. (Compare with vcs_read.)
thanks,
--
js
suse labs
next prev parent reply other threads:[~2019-11-05 9:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAM6JnLeEnvjjQPyLeh+8dt5wGNud_vks5k_eXJZy2T1H7ao=hQ@mail.gmail.com>
2019-11-04 15:24 ` Greg KH
2019-11-04 15:50 ` Nicolas Pitre
2019-11-04 16:15 ` Or Cohen
2019-11-04 18:33 ` Nicolas Pitre
2019-11-05 6:54 ` Jiri Slaby
2019-11-05 9:03 ` Or Cohen
2019-11-05 9:14 ` Jiri Slaby [this message]
2019-11-05 9:33 ` Nicolas Pitre
2019-11-05 10:29 ` Jiri Slaby
2019-11-05 10:53 ` Dmitry Vyukov
2019-11-05 13:44 ` Nicolas Pitre
2019-11-06 17:01 ` Or Cohen
2019-11-26 21:55 ` Nicolas Pitre
2019-11-27 6:45 ` Greg KH
2019-11-27 16:24 ` Nicolas Pitre
2019-11-27 16:30 ` Greg KH
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=a0550a96-a7db-60d7-c4ac-86be8c8dd275@suse.com \
--to=jslaby@suse.com \
--cc=daniel.vetter@ffwll.ch \
--cc=ghalat@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jwilk@jwilk.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=nico@fluxnic.net \
--cc=nmarkus@paloaltonetworks.com \
--cc=orcohen@paloaltonetworks.com \
--cc=sam@ravnborg.org \
--cc=syzkaller@googlegroups.com \
--cc=textshell@uchuujin.de \
/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
all inboxes | Powered by JetHome®