[lkml]   [2005]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Bogus buffer length check in linux-2.6.11 read()
    linux-os wrote:
    > The attached file shows that the kernel thinks it's doing
    > something helpful by checking the length of the input
    > buffer for a read(). It will return "Bad Address" until
    > the length is 1632 bytes. Apparently the kernel thinks
    > 1632 is a good length!

    Likely because only 1632 bytes of memory is accessible after the start
    of the buf buffer, and trying to read in more than that results in
    copy_to_user failing to write some data.

    > Did anybody consider the overhead necessary to do this
    > and the fact that the kernel has no way of knowing if
    > the pointer to the buffer is valid until it actually
    > does the write. What was wrong with copy_to_user()?
    > Why is there the additional bogus check?

    What additional check?

    Robert Hancock Saskatoon, SK, Canada
    To email, remove "nospam" from
    Home Page:

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:11    [W:0.035 / U:134.348 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site