KSPP / linux

Linux kernel source tree (Kernel Self Protection Project)
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project
Other
83 stars 5 forks source link

Address -Warray-bounds warnings in net/socket.c #314

Open GustavoARSilva opened 1 year ago

GustavoARSilva commented 1 year ago

A total of 28 warnings

net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[3397917]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[4709393]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[5478274]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[5592405]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[5711392]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[5835553]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[5965232]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6100805]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6242685]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6316128]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6391320]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6468324]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6547206]' [-Warray-bounds=]
net/socket.c:654:21: warning: array subscript -1 is outside array bounds of 'struct inode[6628035]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[3397917]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[4709393]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[5478274]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[5592405]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[5711392]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[5835553]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[5965232]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6100805]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6242685]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6316128]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6391320]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6468324]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6547206]' [-Warray-bounds=]
net/socket.c:655:26: warning: array subscript -1 is outside array bounds of 'struct inode[6628035]' [-Warray-bounds=]
kees commented 9 months ago

I can't reproduce this. What was the compiler and version, and what sha is this from?

GustavoARSilva commented 9 months ago

I can't reproduce this. What was the compiler and version, and what sha is this from?

GCC 13.2.0