From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <JBottomley@odin.com>,
syzkaller@googlegroups.com, chunwang@redhat.com
Subject: Re: [PATCH] scsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly
Date: Mon, 25 Sep 2017 15:28:19 -0400 [thread overview]
Message-ID: <yq1a81ih92k.fsf@oracle.com> (raw)
In-Reply-To: <0c9fd6fbc0f5fa7b72e6ae5b82d5499a38fd375e.1503836726.git.lucien.xin@gmail.com> (Xin Long's message of "Sun, 27 Aug 2017 20:25:26 +0800")
Xin,
> ChunYu found a kernel crash by syzkaller:
[...]
> It's caused by skb_shared_info at the end of sk_buff was overwritten by
> ISCSI_KEVENT_IF_ERROR when parsing nlmsg info from skb in iscsi_if_rx.
>
> During the loop if skb->len == nlh->nlmsg_len and both are sizeof(*nlh),
> ev = nlmsg_data(nlh) will acutally get skb_shinfo(SKB) instead and set a
> new value to skb_shinfo(SKB)->nr_frags by ev->type.
>
> This patch is to fix it by checking nlh->nlmsg_len properly there to
> avoid over accessing sk_buff.
Applied to 4.14/scsi-fixes. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2017-09-25 19:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-27 12:25 [PATCH] scsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly Xin Long
2017-08-27 12:37 ` Xin Long
2017-09-13 15:51 ` Chris Leech
2017-09-25 10:56 ` Vladis Dronov
2017-09-25 19:28 ` Martin K. Petersen [this message]
2017-09-29 13:33 ` [PATCH] " Ewan D. Milne
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=yq1a81ih92k.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=JBottomley@odin.com \
--cc=chunwang@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=syzkaller@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.