From: Dan Carpenter <dan.carpenter@oracle.com> To: Peilin Ye <yepeilin.cs@gmail.com> Cc: Denis Efremov <efremov@linux.com>, Jens Axboe <axboe@kernel.dk>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-kernel-mentees@lists.linuxfoundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH v2] block/floppy: Prevent kernel-infoleak in raw_cmd_copyout() Date: Wed, 29 Jul 2020 15:58:20 +0300 [thread overview] Message-ID: <20200729125820.GB1840@kadam> (raw) In-Reply-To: <20200729115157.8519-1-yepeilin.cs@gmail.com> Argh... This isn't right still. The "ptr" comes from raw_cmd_copyin() ptr = kmalloc(sizeof(struct floppy_raw_cmd), GFP_KERNEL); The struct hole could still be uninitialized from kmalloc() and instead of from the stack. Smatch is only looking for the common stack info leaks and doesn't worn about holes in kmalloc()ed memory. regards, dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: Peilin Ye <yepeilin.cs@gmail.com> Cc: Jens Axboe <axboe@kernel.dk>, Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org, Denis Efremov <efremov@linux.com>, linux-block@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [Linux-kernel-mentees] [PATCH v2] block/floppy: Prevent kernel-infoleak in raw_cmd_copyout() Date: Wed, 29 Jul 2020 15:58:20 +0300 [thread overview] Message-ID: <20200729125820.GB1840@kadam> (raw) In-Reply-To: <20200729115157.8519-1-yepeilin.cs@gmail.com> Argh... This isn't right still. The "ptr" comes from raw_cmd_copyin() ptr = kmalloc(sizeof(struct floppy_raw_cmd), GFP_KERNEL); The struct hole could still be uninitialized from kmalloc() and instead of from the stack. Smatch is only looking for the common stack info leaks and doesn't worn about holes in kmalloc()ed memory. regards, dan carpenter _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-07-29 13:00 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-28 14:19 [Linux-kernel-mentees] [PATCH] block/floppy: Prevent kernel-infoleak in raw_cmd_copyout() Peilin Ye 2020-07-28 14:19 ` Peilin Ye 2020-07-29 9:07 ` Denis Efremov 2020-07-29 9:07 ` Denis Efremov 2020-07-29 9:18 ` Denis Efremov 2020-07-29 9:18 ` Denis Efremov 2020-07-29 9:46 ` Peilin Ye 2020-07-29 9:46 ` Peilin Ye 2020-07-29 11:51 ` [Linux-kernel-mentees] [PATCH v2] " Peilin Ye 2020-07-29 11:51 ` Peilin Ye 2020-07-29 12:58 ` Dan Carpenter [this message] 2020-07-29 12:58 ` Dan Carpenter 2020-07-29 13:22 ` Denis Efremov 2020-07-29 13:22 ` Denis Efremov 2020-07-29 13:42 ` Dan Carpenter 2020-07-29 13:42 ` Dan Carpenter 2020-07-30 8:11 ` Arnd Bergmann 2020-07-30 8:11 ` Arnd Bergmann 2020-07-30 18:10 ` Kees Cook 2020-07-30 18:10 ` Kees Cook 2020-07-30 20:45 ` Arnd Bergmann 2020-07-30 20:45 ` Arnd Bergmann 2021-07-23 22:22 ` Kees Cook 2021-07-23 22:22 ` Kees Cook
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=20200729125820.GB1840@kadam \ --to=dan.carpenter@oracle.com \ --cc=arnd@arndb.de \ --cc=axboe@kernel.dk \ --cc=efremov@linux.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-block@vger.kernel.org \ --cc=linux-kernel-mentees@lists.linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=yepeilin.cs@gmail.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: linkBe 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.