Skip to contentSkip to conversation

ext4: buffer underrun in ext4_ext_split()?

PATCH Roel Kluin 2 participants 3 messages Aug 7, 2009 – Aug 8, 2009 ext4 file system

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

If depth' is less or equal to at', a buffer underrun occurs

---
I am not sure whether this is possible.

fs/ext4/extents.c +1 -1
index afea652..25bc182 100644
@@ -822,7 +822,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
 	}
 
 	/* initialize new leaf */
-	newblock = ablocks[--a];
+	newblock = a ? ablocks[--a] : 0;
 	BUG_ON(newblock == 0);
 	bh = sb_getblk(inode->i_sb, newblock);
 	if (!bh) {
author
#1 lore raw

Op 07-08-09 20:19, Roel Kluin schreef:

Quoted 1 line

If depth' is less or equal to at', a buffer underrun occurs

s/underrun/overflow/g

maintainer
#2 lore raw
In reply to Roel Kluin
Quoted 5 lines · Roel Kluin

If depth' is less or equal to at', a buffer underrun occurs

---
I am not sure whether this is possible.

I'm pretty sure this could never happen. ext4_ext_split is only called from one place, and only when the leaf node is full.

- Ted