2002-07-17 20:49:17

by Kurt Garloff

[permalink] [raw]
Subject: [PATCH] IDE: memset kmalloced gendisk structures

Hi,

the IDE driver does kmalloc() memory for filling in the gendisk structure.
But it does neither copy an initialized structure in there nor does it
memset(,0,) the structure, so the fields not initialized explicitly
are filled with random values, often with 0x5a5a5a5a (slab poisoning) ...

This is bound to break as soon as some field gets added to the gendisk
struct; normally authors assume that the unknown/unused fields are
initialized to zero by the compiler.

Patch against 2.4.19rc1 attached.
--
Kurt Garloff <[email protected]> [Eindhoven, NL]
Physics: Plasma simulations <[email protected]> [TU Eindhoven, NL]
Linux: SCSI, Security <[email protected]> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)


Attachments:
(No filename) (0.00 B)
(No filename) (189.00 B)
Download all attachments