lkml.org 
[lkml]   [2013]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vsprintf: drop comment claiming %n is ignored
> Why would you want to artificially make the function diverge
> from the spec?

Because %n make it easy to convert a not-uncommon format string bug into
a code injection. Thus, poses a significant security vulnerability.

Since it's an obscure and rarely-used feature, it is straightforward
to eliminate all users in the Linux kernel, making removing it possible.

I agree that if it were harmless, it would be useful to leave it
implemented just for simplicity (it's a trivial amount of code), but
it's not harmless.

> People shouldn't be caught by surprises if at all
> possible, and one can certainly not expect people to go look at
> the comment before the function implementation to find out
> what basic (standard) features _do not_ work (one can expect
> so when trying to find out about _extensions_).

This is why people propose implementing it as a kernel warning.

Strongly support this change.


\
 
 \ /
  Last update: 2013-09-13 22:21    [W:0.111 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site