CC: [email protected] CC: Linux Memory Management List <[email protected]> TO: Stephen Rothwell <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 454c576c3f5e51d60f00a4ac0dde07f4f9d70e9d commit: ed05281b3fa0c502eeb197d301414f2995e6a2e4 [9160/9190] Merge branch 'akpm-current/current' :::::: branch date: 5 days ago :::::: commit date: 5 days ago config: i386-randconfig-m021-20210405 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: net/netfilter/nf_log_syslog.c:212 nf_log_dump_tcp_header() warn: mask and shift to zero vim +212 net/netfilter/nf_log_syslog.c e465cccd0b9de1 Florian Westphal 2021-03-25 175 e465cccd0b9de1 Florian Westphal 2021-03-25 176 static noinline_for_stack int e465cccd0b9de1 Florian Westphal 2021-03-25 177 nf_log_dump_tcp_header(struct nf_log_buf *m, e465cccd0b9de1 Florian Westphal 2021-03-25 178 const struct sk_buff *skb, e465cccd0b9de1 Florian Westphal 2021-03-25 179 u8 proto, int fragment, e465cccd0b9de1 Florian Westphal 2021-03-25 180 unsigned int offset, e465cccd0b9de1 Florian Westphal 2021-03-25 181 unsigned int logflags) e465cccd0b9de1 Florian Westphal 2021-03-25 182 { e465cccd0b9de1 Florian Westphal 2021-03-25 183 struct tcphdr _tcph; e465cccd0b9de1 Florian Westphal 2021-03-25 184 const struct tcphdr *th; e465cccd0b9de1 Florian Westphal 2021-03-25 185 e465cccd0b9de1 Florian Westphal 2021-03-25 186 /* Max length: 10 "PROTO=TCP " */ e465cccd0b9de1 Florian Westphal 2021-03-25 187 nf_log_buf_add(m, "PROTO=TCP "); e465cccd0b9de1 Florian Westphal 2021-03-25 188 e465cccd0b9de1 Florian Westphal 2021-03-25 189 if (fragment) e465cccd0b9de1 Florian Westphal 2021-03-25 190 return 0; e465cccd0b9de1 Florian Westphal 2021-03-25 191 e465cccd0b9de1 Florian Westphal 2021-03-25 192 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ e465cccd0b9de1 Florian Westphal 2021-03-25 193 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); e465cccd0b9de1 Florian Westphal 2021-03-25 194 if (!th) { e465cccd0b9de1 Florian Westphal 2021-03-25 195 nf_log_buf_add(m, "INCOMPLETE [%u bytes] ", skb->len - offset); e465cccd0b9de1 Florian Westphal 2021-03-25 196 return 1; e465cccd0b9de1 Florian Westphal 2021-03-25 197 } e465cccd0b9de1 Florian Westphal 2021-03-25 198 e465cccd0b9de1 Florian Westphal 2021-03-25 199 /* Max length: 20 "SPT=65535 DPT=65535 " */ e465cccd0b9de1 Florian Westphal 2021-03-25 200 nf_log_buf_add(m, "SPT=%u DPT=%u ", e465cccd0b9de1 Florian Westphal 2021-03-25 201 ntohs(th->source), ntohs(th->dest)); e465cccd0b9de1 Florian Westphal 2021-03-25 202 /* Max length: 30 "SEQ=4294967295 ACK=4294967295 " */ e465cccd0b9de1 Florian Westphal 2021-03-25 203 if (logflags & NF_LOG_TCPSEQ) { e465cccd0b9de1 Florian Westphal 2021-03-25 204 nf_log_buf_add(m, "SEQ=%u ACK=%u ", e465cccd0b9de1 Florian Westphal 2021-03-25 205 ntohl(th->seq), ntohl(th->ack_seq)); e465cccd0b9de1 Florian Westphal 2021-03-25 206 } e465cccd0b9de1 Florian Westphal 2021-03-25 207 e465cccd0b9de1 Florian Westphal 2021-03-25 208 /* Max length: 13 "WINDOW=65535 " */ e465cccd0b9de1 Florian Westphal 2021-03-25 209 nf_log_buf_add(m, "WINDOW=%u ", ntohs(th->window)); e465cccd0b9de1 Florian Westphal 2021-03-25 210 /* Max length: 9 "RES=0x3C " */ e465cccd0b9de1 Florian Westphal 2021-03-25 211 nf_log_buf_add(m, "RES=0x%02x ", (u_int8_t)(ntohl(tcp_flag_word(th) & e465cccd0b9de1 Florian Westphal 2021-03-25 @212 TCP_RESERVED_BITS) >> 22)); e465cccd0b9de1 Florian Westphal 2021-03-25 213 /* Max length: 32 "CWR ECE URG ACK PSH RST SYN FIN " */ e465cccd0b9de1 Florian Westphal 2021-03-25 214 if (th->cwr) e465cccd0b9de1 Florian Westphal 2021-03-25 215 nf_log_buf_add(m, "CWR "); e465cccd0b9de1 Florian Westphal 2021-03-25 216 if (th->ece) e465cccd0b9de1 Florian Westphal 2021-03-25 217 nf_log_buf_add(m, "ECE "); e465cccd0b9de1 Florian Westphal 2021-03-25 218 if (th->urg) e465cccd0b9de1 Florian Westphal 2021-03-25 219 nf_log_buf_add(m, "URG "); e465cccd0b9de1 Florian Westphal 2021-03-25 220 if (th->ack) e465cccd0b9de1 Florian Westphal 2021-03-25 221 nf_log_buf_add(m, "ACK "); e465cccd0b9de1 Florian Westphal 2021-03-25 222 if (th->psh) e465cccd0b9de1 Florian Westphal 2021-03-25 223 nf_log_buf_add(m, "PSH "); e465cccd0b9de1 Florian Westphal 2021-03-25 224 if (th->rst) e465cccd0b9de1 Florian Westphal 2021-03-25 225 nf_log_buf_add(m, "RST "); e465cccd0b9de1 Florian Westphal 2021-03-25 226 if (th->syn) e465cccd0b9de1 Florian Westphal 2021-03-25 227 nf_log_buf_add(m, "SYN "); e465cccd0b9de1 Florian Westphal 2021-03-25 228 if (th->fin) e465cccd0b9de1 Florian Westphal 2021-03-25 229 nf_log_buf_add(m, "FIN "); e465cccd0b9de1 Florian Westphal 2021-03-25 230 /* Max length: 11 "URGP=65535 " */ e465cccd0b9de1 Florian Westphal 2021-03-25 231 nf_log_buf_add(m, "URGP=%u ", ntohs(th->urg_ptr)); e465cccd0b9de1 Florian Westphal 2021-03-25 232 e465cccd0b9de1 Florian Westphal 2021-03-25 233 if ((logflags & NF_LOG_TCPOPT) && th->doff * 4 > sizeof(struct tcphdr)) { e465cccd0b9de1 Florian Westphal 2021-03-25 234 unsigned int optsize = th->doff * 4 - sizeof(struct tcphdr); e465cccd0b9de1 Florian Westphal 2021-03-25 235 u8 _opt[60 - sizeof(struct tcphdr)]; e465cccd0b9de1 Florian Westphal 2021-03-25 236 unsigned int i; e465cccd0b9de1 Florian Westphal 2021-03-25 237 const u8 *op; e465cccd0b9de1 Florian Westphal 2021-03-25 238 e465cccd0b9de1 Florian Westphal 2021-03-25 239 op = skb_header_pointer(skb, offset + sizeof(struct tcphdr), e465cccd0b9de1 Florian Westphal 2021-03-25 240 optsize, _opt); e465cccd0b9de1 Florian Westphal 2021-03-25 241 if (!op) { e465cccd0b9de1 Florian Westphal 2021-03-25 242 nf_log_buf_add(m, "OPT (TRUNCATED)"); e465cccd0b9de1 Florian Westphal 2021-03-25 243 return 1; e465cccd0b9de1 Florian Westphal 2021-03-25 244 } e465cccd0b9de1 Florian Westphal 2021-03-25 245 e465cccd0b9de1 Florian Westphal 2021-03-25 246 /* Max length: 127 "OPT (" 15*4*2chars ") " */ e465cccd0b9de1 Florian Westphal 2021-03-25 247 nf_log_buf_add(m, "OPT ("); e465cccd0b9de1 Florian Westphal 2021-03-25 248 for (i = 0; i < optsize; i++) e465cccd0b9de1 Florian Westphal 2021-03-25 249 nf_log_buf_add(m, "%02X", op[i]); e465cccd0b9de1 Florian Westphal 2021-03-25 250 e465cccd0b9de1 Florian Westphal 2021-03-25 251 nf_log_buf_add(m, ") "); e465cccd0b9de1 Florian Westphal 2021-03-25 252 } e465cccd0b9de1 Florian Westphal 2021-03-25 253 e465cccd0b9de1 Florian Westphal 2021-03-25 254 return 0; e465cccd0b9de1 Florian Westphal 2021-03-25 255 } e465cccd0b9de1 Florian Westphal 2021-03-25 256 :::::: The code at line 212 was first introduced by commit :::::: e465cccd0b9de113a81280bd52ee717bf5e3d1a2 netfilter: nf_log_common: merge with nf_log_syslog :::::: TO: Florian Westphal <[email protected]> :::::: CC: Pablo Neira Ayuso <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
