<p><b>@nmeum</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11737#discussion_r298849509">sys/net/gnrc/application_layer/tftp/gnrc_tftp.c</a>:</p>
<pre style='color:#555'>> @@ -1047,6 +1047,10 @@ int _tftp_decode_start(tftp_context_t *ctxt, uint8_t *buf, gnrc_pktsnip_t *outbu
 
     /* decode the TFTP transfer mode */
     for (uint32_t idx = 0; idx < ARRAY_LEN(_tftp_modes); ++idx) {
+        if (_tftp_modes[idx].len > (inpkt->size - sizeof(*hdr) - fnlen)) {
</pre>
<p>No, I strongly disagree. Just because the RFC requires valid messages to use null-terminators for strings doesn't mean that an attacker can't forge a malicious message without terminating null bytes.</p>
<p>Since the packet buffer itself doesn't seem to be terminated with a null byte using a string function on it might result in an out-of-bounds read, reading memory of other packets in the pktbuf.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11737?email_source=notifications&email_token=ABE7WYDTZQUUT4FGVPDQBB3P5EN2XA5CNFSM4H3A2IM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5B2HCQ#discussion_r298849509">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYCQ5JIHYVNITOKGEPLP5EN2XANCNFSM4H3A2IMQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYDFO77ASSY5VJLMPV3P5EN2XA5CNFSM4H3A2IM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5B2HCQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11737?email_source=notifications\u0026email_token=ABE7WYDTZQUUT4FGVPDQBB3P5EN2XA5CNFSM4H3A2IM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5B2HCQ#discussion_r298849509",
"url": "https://github.com/RIOT-OS/RIOT/pull/11737?email_source=notifications\u0026email_token=ABE7WYDTZQUUT4FGVPDQBB3P5EN2XA5CNFSM4H3A2IM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5B2HCQ#discussion_r298849509",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>