Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1458357
| Path | csiph.com!news.freedyn.net!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Martin K. Petersen" <martin.petersen@oracle.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated |
| Date | Tue, 09 Aug 2016 03:20:01 +0200 |
| Message-ID | <s43S1-Lc-9@gated-at.bofh.it> (permalink) |
| References | <rZLqG-1bP-7@gated-at.bofh.it> |
| X-Original-To | Calvin Owens <calvinowens@fb.com> |
| Organization | Oracle Corporation |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-Source-IP | aserv0022.oracle.com [141.146.126.234] |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 19 |
| X-Original-Cc | Sathya Prakash <sathya.prakash@broadcom.com>, Chaitra P B <chaitra.basappa@broadcom.com>, Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>, "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, <MPT-FusionLinux.pdl@broadcom.com>, <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <kernel-team@fb.com> |
| X-Original-Date | Mon, 08 Aug 2016 21:10:20 -0400 |
| X-Original-Message-ID | <yq1invavjb7.fsf@sermon.lab.mkp.net> |
| X-Original-References | <8b53a29b3ec90c9a7030e8fa3e1555ad5802dce9.1469680625.git.calvinowens@fb.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1458357 |
Show key headers only | View raw
>>>>> "Calvin" == Calvin Owens <calvinowens@fb.com> writes: Calvin> We blindly trust the hardware to give us NUL-terminated strings, Calvin> which is a bad idea because it doesn't always do that. For Calvin> example: Calvin> [ 481.184784] mpt3sas_cm0: enclosure level(0x0000), connector Calvin> name( \x3) Calvin> In this case, connector_name is four spaces. We got lucky here Calvin> because the 2nd byte beyond our character array happens to be a Calvin> NUL. Fix this by explicitly writing '\0' to the end of the Calvin> string to ensure we don't run off the edge of the world in Calvin> printk(). Applied to 4.9/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated Calvin Owens <calvinowens@fb.com> - 2016-07-28 06:50 +0200 Re: [PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-08-05 03:40 +0200 RE: [PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated Chaitra Basappa <chaitra.basappa@broadcom.com> - 2016-08-05 08:50 +0200 Re: [PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-08-09 03:20 +0200
csiph-web