Re: [stable] [PATCH 1/2] sd: fix memory corruption by sd_read_cache_type



On Sun, Feb 26, 2006 at 08:34:10AM -0600, James Bottomley wrote:
Well, OK, I agree allowing us to request data longer than the actual
buffer is a problem. However, I don't exactly see how this actually
causes corruption, since even the initio bridge only sends 12 bytes of
data, so we should stop with a data underrun at that point (however big
the buffer is)

scsi_mode_sense() does memset(buffer, 0, len). You don't need corrupting
data to come from device - 10Kb of zeroes into 512-byte kmalloc'ed buffer
will do the job just fine...

ACKed in that form.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: PB 4.2 - why does the COREDLL!FillInOneHeap(THSNAP ...) cause Debug Break ?
    ... I see that DEBUGCHK() detects something bad. ... Can't find any corruption here or buffer overflow. ... >> casues debugBreak. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Corrupted files fpd2.5; vfp9 sp1
    ... With VFP, you can buffer the data, which greatly reduces the probability of corruption. ... You need to make sure you've rearchitected your application to use buffering when moving to VFP. ... The fpd version always suffered from sporadic file corruption. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: xfs problems (possibly after upgrading from linux kernel 2.6.27.10 to .14)
    ... this implies some kind of memory corruption is occurring. ... And that is another buffer that has been scribbled over. ... Something is corrupting the page cache, ... As far as I can see this only happened after the upgrade about 14 days ...
    (Linux-Kernel)
  • Re: It still here... panic: ufs_dirbad: bad dir
    ... block pointers, is being written out and then something happens to ... I would write some code to record every I/O operation done on the ... raw device then track back to the write that created the corruption. ... Is it worth setting up a ring buffer that just stores the last few ...
    (freebsd-current)
  • Re: image graphics drawing confusion
    ... suggest you subscribe to the RSS feed for the FAQ. ... since the thumbnail ... > System.IO.MemoryStream to create an image from a file buffer in memory. ...
    (microsoft.public.dotnet.framework.drawing)