Marc-André Bombeck
ba22932101
fix(documents): read a JPEG's size past fill bytes and refuse an unreadable one
...
The thumbnail's header walk took the byte after any 0xFF as a marker. A
single 0xFF fill byte after the start-of-image marker, which the JPEG
standard allows and every decoder skips, threw it off; it read no size, and
an unread size let the image through to a decode that allocates the full
bitmap. A small JPEG declaring 20000 x 20000 pixels allocated 1.6 GB in the
web process before the post-decode check could see it.
The avatar upload already had a walker that skips fill bytes. Both now use
one reader (lib/image-dimensions) that follows the marker rules: fill bytes,
the length-less markers, and no size when a scan or the end of the image
comes before a frame header. The thumbnail treats an unreadable size as a
refusal (size-unreadable) for every format it decodes, and the backfill
counts that refusal as final.
2026-10-25 13:52:04 +01:00
..
2026-10-25 02:10:17 +01:00
2026-06-28 03:07:15 +02:00
2026-10-25 00:51:32 +02:00
2026-10-24 11:28:57 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-09-24 09:07:16 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-07-27 14:47:55 +02:00
2026-10-20 13:17:41 +02:00
2026-10-08 09:06:17 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 21:43:55 +02:00
2026-10-23 21:43:55 +02:00
2026-10-23 21:43:55 +02:00
2026-09-03 02:22:37 +02:00
2026-10-22 06:41:17 +02:00
2026-10-23 16:32:10 +02:00
2026-06-19 20:54:56 +02:00
2026-10-11 13:09:12 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-20 09:08:40 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-08-02 01:21:03 +02:00
2026-10-08 09:06:17 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-11 12:31:37 +02:00
2026-10-04 15:56:56 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-24 11:28:57 +02:00
2026-10-23 12:36:09 +02:00
2026-10-25 02:10:17 +01:00
2026-10-24 11:28:57 +02:00
2026-10-25 02:14:17 +01:00
2026-10-24 11:28:57 +02:00
2026-10-24 20:51:35 +02:00
2026-10-24 20:51:35 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-24 11:28:57 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-24 11:28:57 +02:00
2026-10-23 12:36:09 +02:00
2026-10-25 13:52:04 +01:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-09-25 00:31:48 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-15 21:48:57 +02:00
2026-10-20 09:58:02 +02:00
2026-10-18 13:10:21 +02:00
2026-10-20 09:08:40 +02:00
2026-10-21 19:24:21 +02:00
2026-10-20 20:26:30 +02:00
2026-10-08 09:06:17 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 13:33:11 +02:00
2026-07-03 14:13:28 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 22:13:00 +02:00
2026-10-08 08:41:25 +02:00
2026-05-05 20:30:30 +02:00
2026-10-23 16:32:10 +02:00
2026-10-23 12:36:09 +02:00
2026-10-24 11:00:32 +02:00
2026-10-25 04:50:25 +01:00
2026-10-24 11:00:32 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-24 22:20:06 +02:00
2026-10-21 19:53:57 +02:00
2026-10-23 13:33:11 +02:00
2026-10-23 12:36:09 +02:00
2026-10-01 09:23:45 +02:00
2026-10-23 12:36:09 +02:00
2026-10-20 09:08:40 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-09-25 07:39:06 +02:00
2026-10-20 16:52:08 +02:00
2026-10-11 12:15:03 +02:00
2026-10-19 16:00:45 +02:00
2026-10-22 21:43:08 +02:00
2026-10-08 09:05:54 +02:00
2026-10-20 09:08:40 +02:00
2026-10-01 09:23:45 +02:00
2026-06-27 15:09:11 +02:00
2026-10-09 01:03:02 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-20 05:06:25 +02:00
2026-10-22 21:43:08 +02:00
2026-10-21 12:22:36 +02:00
2026-10-09 12:02:25 +02:00
2026-10-20 09:08:40 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-20 09:08:40 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-25 04:50:25 +01:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-09-26 16:23:14 +02:00
2026-10-24 11:00:32 +02:00
2026-10-24 11:00:32 +02:00
2026-10-20 09:08:40 +02:00
2026-10-21 01:17:20 +02:00
2026-09-10 10:15:31 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-07-18 16:50:56 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-20 09:08:40 +02:00
2026-10-16 05:55:31 +02:00
2026-07-26 18:57:21 +02:00
2026-10-25 04:50:25 +01:00
2026-10-20 20:07:25 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-08 10:32:11 +02:00
2026-06-16 20:58:56 +02:00
2026-10-25 00:35:36 +02:00
2026-06-10 13:34:37 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-25 00:35:36 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 13:33:11 +02:00
2026-10-20 13:17:41 +02:00
2026-10-24 20:51:35 +02:00
2026-10-20 03:34:51 +02:00
2026-10-11 12:31:37 +02:00
2026-07-15 22:49:07 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-21 19:53:57 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-10-23 12:36:09 +02:00
2026-06-05 08:10:13 +02:00
2026-07-20 12:24:15 +02:00
2026-05-22 09:18:52 +02:00
2026-05-15 22:59:10 +02:00
2026-10-03 17:53:36 +02:00
2026-10-25 04:50:25 +01:00
2026-10-22 18:21:02 +02:00