ladybird/Userland/Libraries
Ben Wiederhake 3aeb57ed09 AK+Everywhere: Fix data corruption due to code-point-to-char conversion
In particular, StringView::contains(char) is often used with a u32
code point. When this is done, the compiler will for some reason allow
data corruption to occur silently.

In fact, this is one of two reasons for the following OSS Fuzz issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49184
This is probably a very old bug.

In the particular case of URLParser, AK::is_url_code_point got confused:
    return /* ... */ || "!$&'()*+,-./:;=?@_~"sv.contains(code_point);
If code_point is a large code point that happens to have the correct
lower bytes, AK::is_url_code_point is then convinced that the given
code point is okay, even if it is actually problematic.

This commit fixes *only* the silent data corruption due to the erroneous
conversion, and does not fully resolve OSS-Fuzz#49184.
2022-10-09 10:37:20 -06:00
..
LibArchive Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibAudio SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibC LibC: Implement mkstemps() in stdlib and add a test 2022-10-06 16:14:40 +01:00
LibCards LibCards: Remove card-back-image scaling 2022-08-22 12:50:41 +02:00
LibChess ChessEngine: Use reduced Board objects in MCTSTree 2022-08-22 21:20:41 +02:00
LibCodeComprehension Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
LibCompress LibCompress+Tests: Demonstrate and fix faulty metadata length 2022-09-17 04:10:11 +00:00
LibConfig SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibCore LibCore: Make Core::System::{send,recv}fd work on macOS 2022-10-07 18:14:48 +01:00
LibCoredump Everywhere: Make the codebase more architecture aware 2022-07-27 21:46:42 +00:00
LibCpp LibCpp: Add .clang-format to disable clang-format for the LibCpp Tests 2022-09-19 15:52:37 -07:00
LibCrypt Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
LibCrypto Everywhere: Remove a bunch of dead write-only variables 2022-09-16 05:39:28 +00:00
LibDebug AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places 2022-10-04 23:35:07 +01:00
LibDesktop SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibDeviceTree
LibDiff Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibDNS Libraries: Add missing includes, add namespace qualifiers 2022-09-18 13:27:24 -04:00
LibDSP LibDSP: Add a fixed mastering processor to Track 2022-07-25 15:25:13 +02:00
LibEDID AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places 2022-10-04 23:35:07 +01:00
LibELF LibC: Move dlfcn_integration.h to the bits directory 2022-09-05 10:12:02 +01:00
LibFileSystemAccessClient SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibGemini Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibGfx LibGfx: Remove unnecessary divides in MatrixFilter 2022-10-07 13:08:24 +01:00
LibGL LibGL: Remove GL::present_context 2022-09-17 19:38:30 +02:00
LibGPU Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
LibGUI LibGUI: Consider spacing for Toolbar overflow calculation 2022-10-06 12:17:38 +01:00
LibHTTP LibHTTP: Use 'close' as the default value for Connection in HTTP/1.0 2022-10-01 19:37:01 +02:00
LibIDL LibIDL: Remove static maps for interfaces and resolved imports 2022-10-09 10:14:57 +02:00
LibImageDecoderClient SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibIMAP Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibIPC LibIPC: Allow overriding the use of deferred_invoke() 2022-10-06 09:51:04 +02:00
LibJS AK+Everywhere: Fix data corruption due to code-point-to-char conversion 2022-10-09 10:37:20 -06:00
LibKeyboard Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibLine Libraries: Add missing includes, add namespace qualifiers 2022-09-18 13:27:24 -04:00
LibLocale LibLocale: Move locale source files to the LibLocale library 2022-09-05 14:37:16 -04:00
LibMain Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
LibMarkdown LibMarkdown: Allow extra content to be inserted into HTML output's head 2022-09-28 23:58:26 +01:00
LibPartition LibPartition: Fix end block off by one error 2022-07-21 20:13:44 +01:00
LibPCIDB Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibPDF Libraries: Add missing includes, add namespace qualifiers 2022-09-18 13:27:24 -04:00
LibProtocol SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibRegex LibC+LibRegex: Move central regex definitions into LibC/bits 2022-09-20 12:57:21 +01:00
LibSanitizer Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibSoftGPU Libraries: Add missing includes, add namespace qualifiers 2022-09-18 13:27:24 -04:00
LibSQL SystemServer+LoginServer+Userland: Switch to sid-based sockets 2022-10-03 11:11:29 +02:00
LibSymbolication Everywhere: Make the codebase more architecture aware 2022-07-27 21:46:42 +00:00
LibSyntax Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibSystem Meta+Userland: Add ENABLE_USERSPACE_COVERAGE_COLLECTION CMake option 2022-05-02 01:46:18 +02:00
LibTest LibTest: Extract some useful functions from TestRunner.h 2022-09-11 20:25:51 +01:00
LibTextCodec Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibThreading Everywhere: Prefix 'TYPEDEF_DISTINCT_ORDERED_ID' with 'AK_' 2022-07-22 23:09:43 +01:00
LibTimeZone LibTimeZone: Do not use tzname to determine the current time zone 2022-09-28 23:52:51 +01:00
LibTLS Everywhere: Remove a bunch of dead write-only variables 2022-09-16 05:39:28 +00:00
LibUnicode LibUnicode: Fix Hangul syllable composition for specific cases 2022-10-07 07:53:27 -04:00
LibUSBDB Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibVideo Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibVT AK+Everywhere: Replace "protocol" with "scheme" url helpers 2022-09-29 09:39:04 +01:00
LibWasm LibWasm: Use String::join in Printer where apropriate 2022-10-03 14:15:46 +01:00
LibWeb AK+Everywhere: Fix data corruption due to code-point-to-char conversion 2022-10-09 10:37:20 -06:00
LibWebSocket AK+Everywhere: Replace "protocol" with "scheme" url helpers 2022-09-29 09:39:04 +01:00
LibWebView LibWebView: Add abstract virtual base for WebView implementations 2022-10-06 09:51:04 +02:00
LibX86 AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places 2022-10-04 23:35:07 +01:00
LibXML Libraries: Add missing includes, add namespace qualifiers 2022-09-18 13:27:24 -04:00
CMakeLists.txt LibIDL+WrapperGenerator: Move IDL code into a library 2022-09-17 21:27:17 +02:00