[LBBS-149] net_imap: Assertion on non-synchronizing upload of message too large
For some reason, a 393 MB IMAP upload was attempted (likely client error), which causes a crash if APPEND is used with non-synchronizing literals (as below). This is because we reply NO, but then continue the append loop, and then the next time we reply, we've already replied so the assertion that we haven't replied yet fails.
[2026-03-15 21:44:24.582] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2254 append "REDACTED" (\Seen encrypted) "20-Nov-2023 14:42:40 -0400" {71152+}
[2026-03-15 21:44:24.832] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2256 append "REDACTED" (\Seen encrypted) "20-Nov-2023 20:17:52 -0400" {9406+}
[2026-03-15 21:44:25.072] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2258 append "REDACTED" (\Seen encrypted) "22-Nov-2023 21:09:47 -0400" {7111+}
[2026-03-15 21:44:25.330] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2260 append "REDACTED" (\Seen encrypted) "23-Nov-2023 11:48:10 -0400" {9136+}
[2026-03-15 21:44:25.590] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2263 append "REDACTED" (\Seen encrypted) "23-Nov-2023 12:24:50 -0400" {916428+}
[2026-03-15 21:44:25.971] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2266 append "REDACTED" (\Seen encrypted) "23-Nov-2023 12:35:10 -0400" {916503+}
[2026-03-15 21:44:28.418] DEBUG[258228]: net_imap.c:5116 handle_client: 0x7f2bd2ffc830 => 2269 append "REDACTED" (\Seen encrypted) "23-Nov-2023 13:22:28 -0400" {412163754+}
...
[2026-03-15 21:45:07.007] DEBUG[258228]: net_imap.c:2622 handle_append: 0x7f2bd2ffc830 <= 2269 NO [LIMIT] Message too large
[2026-03-15 21:45:07.007] DEBUG[258228]: net_imap.c:2490 handle_append: 1 message appended so far, will there be more?
[2026-03-15 21:45:07.034] DEBUG[258229]: io_compress.c:136 decompress_and_deliver: Inflated to 11 bytes
[2026-03-15 21:45:07.035] ERROR[258228]: net_imap.c:2508 handle_append: Failed assertion !imap->finalized_response
[2026-03-15 21:45:07.036] ERROR[258228]: backtrace.c:255 bbs_log_backtrace: Got 10 backtrace records
[2026-03-15 21:45:07.183] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 0: lbbs bbs_log_backtrace()
[2026-03-15 21:45:07.183] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 1: lbbs __bbs_assert_fatal()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:275 bbs_log_backtrace: 2: [0x7f2bfc0f58b0] net_imap.so bbs.h:437 __bbs_assert()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:275 bbs_log_backtrace: 2: [ inlined] net_imap.so net_imap.c:2508 handle_append()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 3: [0x7f2bfc10b7b7] net_imap.so net_imap.c:4828 imap_process()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 4: [0x7f2bfc112168] net_imap.so net_imap.c:5118 handle_client()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 5: [0x7f2bfc112396] net_imap.so net_imap.c:5152 imap_handler()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 6: [0x7f2bfc112607] net_imap.so net_imap.c:5176 __imap_handler()
[2026-03-15 21:45:07.184] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 7: lbbs <unknown>()
[2026-03-15 21:45:07.185] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 8: [0x7f2bff0b0ea7] libpthread.so.0 pthread_create.c:478 start_thread()
[2026-03-15 21:45:07.185] ERROR[258228]: backtrace.c:279 bbs_log_backtrace: 9: [0x7f2bfefd0acf] libc.so.6 clone.S:97 __GI___clone()Comments
You must be logged in to leave a comment.