Commit 7b5b1b5
Github Executorch
Fix TOB-EXECUTORCH-35, -37: validate XNNPACK flatbuffer graph and num_externs
Add null checks for flatbuffer_graph, xvalues(), and xnodes() after
deserialization to prevent NULL pointer dereferences on malformed input.
Validate num_externs does not exceed total number of values to prevent
unbounded memory allocation in xnn_create_subgraph.
Authored-with: Claude1 parent 21d9c64 commit 7b5b1b5
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
1847 | 1853 | | |
1848 | 1854 | | |
1849 | 1855 | | |
| |||
1853 | 1859 | | |
1854 | 1860 | | |
1855 | 1861 | | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
1856 | 1871 | | |
1857 | 1872 | | |
1858 | | - | |
| 1873 | + | |
1859 | 1874 | | |
1860 | 1875 | | |
1861 | 1876 | | |
| |||
0 commit comments