Files
linux/fs
Darrick J. Wong dd07bb8b6b xfs: revert commit 8954c44ff4
The name passed into __xfs_xattr_put_listent is exactly namelen bytes
long and not null-terminated.  Passing namelen+1 to the strscpy function

    strscpy(offset, (char *)name, namelen + 1);

is therefore wrong.  Go back to the old code, which works fine because
strncpy won't find a null in @name and stops after namelen bytes.  It
really could be a memcpy call, but it worked for years.

Reported-by: syzbot+898115bc6d7140437215@syzkaller.appspotmail.com
Fixes: 8954c44ff4 ("xfs: use strscpy() to instead of strncpy()")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
2023-02-10 09:06:06 -08:00
..
2022-12-11 18:12:18 -08:00
2022-10-20 10:13:27 +02:00
2022-09-24 07:00:00 +02:00
2022-12-11 18:12:18 -08:00
2022-05-09 16:21:46 -04:00
2023-01-06 15:44:32 +01:00
2022-09-11 20:26:07 -07:00
2023-02-10 09:06:06 -08:00
2022-10-20 10:13:27 +02:00
2022-08-20 11:34:33 -04:00
2022-12-11 18:12:17 -08:00
2022-12-21 14:45:25 +01:00
2022-06-28 13:58:05 -04:00
2022-10-26 10:02:34 +02:00