The use of s_id should go through the untrusted string path, just to be extra careful.
Showing the changes to security/integrity (1 of 2 files). Show all
Unified · Split
| @@ -56,9 +56,11 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode, · 55 unmodified lines | ||
| 56 | 56 | audit_log_format(ab, " name="); |
| 57 | 57 | audit_log_untrustedstring(ab, fname); |
| 58 | 58 | } |
| 59 | − if (inode) | |
| 60 | − audit_log_format(ab, " dev=%s ino=%lu", | |
| 61 | − inode->i_sb->s_id, inode->i_ino); | |
| 59 | + if (inode) { | |
| 60 | + audit_log_format(ab, " dev="); | |
| 61 | + audit_log_untrustedstring(ab, inode->i_sb->s_id); | |
| 62 | + audit_log_format(ab, " ino=%lu", inode->i_ino); | |
| 63 | + } | |
| 62 | 64 | audit_log_format(ab, " res=%d", !result ? 0 : 1); |
| 63 | 65 | audit_log_end(ab); |
| 64 | 66 | } |