[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cde8bff0812102228q38eda15esf8cf2e0ad70dbce@mail.gmail.com>
Date: Thu, 11 Dec 2008 15:28:59 +0900
From: "Nguyen Anh Quynh" <aquynh@...il.com>
To: "Al Viro" <viro@...iv.linux.org.uk>,
"Andrew Morton" <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
"Kuniyasu Suzaki" <k.suzaki@...t.go.jp>
Subject: Re: [PATCH] fix calls to request_module()
On Thu, Dec 11, 2008 at 3:00 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Thu, Dec 11, 2008 at 02:42:28PM +0900, Nguyen Anh Quynh wrote:
>> > Ah, but that's different. Take a look at that warning and think _why_
>> > it is given and what is it about. Getting an untrusted string as
>> > format argument is a real security hole, but it has nothing to do
>> > with a pile of cases in your patch.
>>
>> Yes, clearly the warning is to warn us about potential format string
>> bugs. But I agree that there are a lot of false possitives.
>>
>> My patch is mainly to make gcc happy.
>
> Your patch is mostly obfuscating the places gcc does *not* warn about...
>
> Looking through it, only
> drivers/media/video/cx18/cx18-driver.c
> drivers/media/video/ivtv/ivtv-driver.c
> drivers/media/video/pvrusb2/pvrusb2-hdw.c
> drivers/media/video/zoran/zoran_card.c
> drivers/mtd/chips/gen_probe.c
> drivers/net/wireless/hostap/hostap_ioctl.c
> drivers/of/of_spi.c
> drivers/usb/storage/libusual.c
> fs/dquot.c
> fs/gfs2/locking.c
> net/ieee80211/ieee80211_wx.c
> sound/core/sound.c
>
> are not of <string literal> -> "%s", <string literal> variety. Everything
> else has never generated a format warning. At least trim the patch,
> removing the obviously useless parts.
Yes, initially I misunderstood these warnings.
So here is the patch, again, with only the "correct" warning fixed.
Signed-off-by: Nguyen Anh Quynh <aquynh@...il.com>
Thanks,
Quynh
# diffstat fix-request_module-call.linus_git_tree.patch
drivers/media/video/cx18/cx18-driver.c | 2 +-
drivers/media/video/ivtv/ivtv-driver.c | 2 +-
drivers/media/video/pvrusb2/pvrusb2-hdw.c | 2 +-
drivers/media/video/zoran/zoran_card.c | 8 ++++----
drivers/mtd/chips/gen_probe.c | 2 +-
drivers/net/wireless/hostap/hostap_ioctl.c | 2 +-
drivers/of/of_spi.c | 2 +-
drivers/usb/storage/libusual.c | 2 +-
fs/dquot.c | 2 +-
fs/gfs2/locking.c | 2 +-
net/ieee80211/ieee80211_wx.c | 2 +-
sound/core/sound.c | 2 +-
12 files changed, 15 insertions(+), 15 deletions(-)
View attachment "fix-request_module-call.linus_git_tree.patch" of type "text/x-patch" (6675 bytes)
Powered by blists - more mailing lists