• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisionead60d38671fb5a0aa5e4f04dbc61736f2d9461f (tree)
Time2008-10-20 06:07:14
AuthorEugene Teo <eteo@redh...>
CommiterWilly Tarreau

Log Message

Remove suid/sgid bits on truncate() (CVE-2008-4210)

Hi Willy,

I noticed that CVE-2008-4210 is missing from the linux-2.4.git tree.

Don (cc'ed) proposed this:

Cc: Don Howard <dhoward@redhat.com>
Test-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Willy Tarreau <w@1wt.eu>

Change Summary

Incremental Difference

--- a/fs/open.c
+++ b/fs/open.c
@@ -109,6 +109,8 @@ int do_truncate(struct dentry *dentry, loff_t length)
109109 down(&inode->i_sem);
110110 newattrs.ia_size = length;
111111 newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
112+ /* Remove suid/sgid on truncate too */
113+ remove_suid(inode);
112114 error = notify_change(dentry, &newattrs);
113115 up(&inode->i_sem);
114116 up_write(&inode->i_alloc_sem);
Show on old repository browser