Commit cb3c6fb
committed
h2: guard PADDED frames with zero-length payload
Fix OOB read in h2_recv_data() and h2_recv_headers() when PADDED is set
but frame length is 0: we now require ≥1 payload byte before reading the
Pad Length octet. Sends GOAWAY/PROTOCOL_ERROR instead of touching OOB.
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>1 parent dea55b5 commit cb3c6fb
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1191 | 1196 | | |
1192 | 1197 | | |
1193 | 1198 | | |
| |||
1867 | 1872 | | |
1868 | 1873 | | |
1869 | 1874 | | |
1870 | | - | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
1871 | 1880 | | |
| 1881 | + | |
1872 | 1882 | | |
1873 | 1883 | | |
1874 | 1884 | | |
| |||
0 commit comments