<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>KDE on Azhar Momin</title><link>https://amazingakai.github.io/tags/kde/</link><description>Recent content in KDE on Azhar Momin</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 30 Aug 2025 20:00:00 +0530</lastBuildDate><atom:link href="https://amazingakai.github.io/tags/kde/index.xml" rel="self" type="application/rss+xml"/><item><title>GSoC 2025: Expanding OSS-Fuzz Integration Across KDE Libraries (Final Update)</title><link>https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries-final-blog/</link><pubDate>Sat, 30 Aug 2025 20:00:00 +0530</pubDate><guid>https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries-final-blog/</guid><description>&lt;p&gt;Hello everyone, this is going to be the final blog post of my GSoC 2025 project. In this post, I will summarize the progress made during the project and discuss the future plans for expanding OSS-Fuzz integration across KDE libraries.&lt;/p&gt;
&lt;h3 id="quick-recap-of-progress"&gt;Quick Recap Of Progress&lt;/h3&gt;
&lt;p&gt;So far, I had integrated several KDE libraries into OSS-Fuzz, including KMime, KIO-Extras/thumbnail, and KFileMetaData (submitted for integration).&lt;/p&gt;
&lt;p&gt;I have also moved existing projects from OSS-Fuzz repository to KDE repositories.&lt;/p&gt;
&lt;h2 id="progress-after-midterm"&gt;Progress After Midterm&lt;/h2&gt;
&lt;p&gt;After midterm, in the first half I focused on integrating new thumbnailers into OSS-Fuzz. I had already integrated KIO-Extras/thumbnail, and I continued with KDEGraphics-Thumbnailers, KDESDK-Thumbnailers, and FFMpeg-Thumbs.&lt;/p&gt;
&lt;p&gt;After that, I mostly worked on improving the existing integration, i.e, testing the fuzzers and fixing any issues, moving to CMake based setup instead of manual compilation of the fuzzers and adding documentation for local testing of the fuzzers.&lt;/p&gt;
&lt;p&gt;The CMake setup allowed for easier maintenance however, it wasn&amp;rsquo;t as simple as it may seem. Since OSS-Fuzz recommends using static builds, many of the libraries didn&amp;rsquo;t link to their transitive dependencies correctly for static builds. This required changes to those libraries (.pc files, .cmake files, etc) for proper static linking.&lt;/p&gt;
&lt;p&gt;The existing setup also lacked documentation for local testing of the fuzzers. I have added documentation for almost all of the fuzzers. This will be helpful for developers to integrate new fuzzers (such as new thumbnailers or KFileMetaData extractors).&lt;/p&gt;
&lt;h2 id="future-plans"&gt;Future Plans&lt;/h2&gt;
&lt;p&gt;With the initial setup of thumbnailers and KFileMetaData, it is easy to integrate new thumbnailers and KFileMetaData extractors. Currently there are a few more thumbnailers that could be integrated into OSS-Fuzz, I plan to work on integrating them soon as well, the list is here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/office/calligra/-/tree/master/extras/thumbnail"&gt;Calligra Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/pim/itinerary/-/tree/master/src/thumbnailer"&gt;Itinerary Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/sdk/kde-dev-utils/-/blob/master/kuiviewer/quicreator.cpp"&gt;Qui Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/multimedia/kdenlive/-/tree/master/thumbnailer"&gt;MLT Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/network/konqueror/-/tree/master/plugins/webarchiver/thumbnailer"&gt;WebArchive Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/games/palapeli/-/tree/master/mime"&gt;Pala Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/plasma/plasma-workspace/-/tree/master/kcms/kfontinst/thumbnail"&gt;Font Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="links"&gt;Links&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Intro Blog post: &lt;a href="https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries"&gt;amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Midterm Blog post: &lt;a href="https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries-midterm-blog"&gt;amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries-midterm-blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="thank-you"&gt;Thank You&lt;/h3&gt;
&lt;p&gt;I would like to thank my mentor, Albert Astals Cid, and the KDE community for their guidance throughout this project. Their feedback was helpful in successfully expanding OSS-Fuzz integration across KDE libraries.&lt;/p&gt;</description></item><item><title>GSoC 2025: Expanding OSS-Fuzz Integration Across KDE Libraries (Midterm Update)</title><link>https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries-midterm-blog/</link><pubDate>Wed, 23 Jul 2025 20:00:00 +0530</pubDate><guid>https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries-midterm-blog/</guid><description>&lt;p&gt;Hello everyone! Midterm evaluations are here, and I wanted to share an update on my GSoC project. Here&amp;rsquo;s what I&amp;rsquo;ve accomplished so far:&lt;/p&gt;
&lt;h3 id="progress-so-far"&gt;Progress So Far&lt;/h3&gt;
&lt;h4 id="migration-of-existing-fuzz-targets"&gt;Migration of Existing Fuzz Targets&lt;/h4&gt;
&lt;p&gt;The first step was migrating the existing build scripts and fuzz targets from the OSS-Fuzz repository into the respective KDE repositories. Maintaining them within the OSS-Fuzz repo added a bit of friction when making changes. Having them in KDE repos makes it easier to maintain and update them.&lt;/p&gt;
&lt;h4 id="karchive-fuzzer"&gt;KArchive Fuzzer&lt;/h4&gt;
&lt;p&gt;Then I worked on &lt;strong&gt;KArchive&lt;/strong&gt; fuzzer doing mainly two changes: First was to split the fuzzer into separate targets for each archive format (like zip, tar, 7z, etc.) to improve coverage. Second was to add libFuzzer dictionary files to guide the fuzzing process better. Here is an image showing the coverage after these changes:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://amazingakai.github.io/images/gsoc-2025-oss-fuzz-karchive-fuzzer.png" alt="KArchive Fuzzer"&gt;&lt;/p&gt;
&lt;p&gt;This coverage was tested using a local corpus and it is pretty solid for just fuzzing the &amp;ldquo;reading&amp;rdquo; part. The coverage will increase on OSS-Fuzz by time as the corpus keeps growing. Splitting the fuzzer into multiple targets allows the fuzzer to focus on specific archive formats, which keeps the corpus size smaller and more efficient.&lt;/p&gt;
&lt;h4 id="kmime-fuzzer"&gt;KMime Fuzzer&lt;/h4&gt;
&lt;p&gt;After that, I focused on &lt;strong&gt;KMime&lt;/strong&gt;. I created a fuzz target for it, which focused on the just the MIME parsing functionality. The parsing part of KMime is critical as it handles untrusted input, such as, from emails (in KMail).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://amazingakai.github.io/images/gsoc-2025-oss-fuzz-kmime-fuzzer.png" alt="KMime Fuzzer"&gt;&lt;/p&gt;
&lt;p&gt;For KMime, I also added a libFuzzer-style dictionary file to help guide the fuzzing process. This helps the fuzzer generate more meaningful inputs, which can improve coverage and help the fuzzer reach deeper code paths.&lt;/p&gt;
&lt;h4 id="kde-thumbnailers-fuzzer"&gt;KDE Thumbnailers Fuzzer&lt;/h4&gt;
&lt;p&gt;After KMime, I moved on to &lt;strong&gt;KDE Thumbnailers&lt;/strong&gt;. I created a fuzzer for the thumbnailers that are used in KDE applications to generate previews of files. This is important as it handles untrusted input from various file formats, such as images, documents, etc. KDE has a lot of thumbnailers, I started with the thumbnailers in &lt;strong&gt;KIO-Extras&lt;/strong&gt; repository, which includes thumbnailers for various file formats like images, videos, documents, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KDE Thumbnailers&lt;/strong&gt; were tricky to fuzz because they aren&amp;rsquo;t standalone. They depend on KIO and KIOGui, which are pretty heavy and pull in a bunch of dependencies not required for thumbnailing. Building the full KIO stack inside OSS-Fuzz would have made the build process slow and complicated.&lt;/p&gt;
&lt;p&gt;To avoid that, I wrote a custom build script that compiles just the thumbnailer source files and their direct dependencies. That keeps the fuzzers lightweight and focused only on the thumbnailing functionality.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://amazingakai.github.io/images/gsoc-2025-oss-fuzz-kde-thumbnailers-fuzzer.png" alt="KDE Thumbnailers Fuzzer"&gt;&lt;/p&gt;
&lt;p&gt;For these thumbnailers, I also created a dictionary file for each thumbnailer separately for the same reason as KMime.&lt;/p&gt;
&lt;h4 id="kfilemetadata-fuzzer"&gt;KFileMetaData Fuzzer&lt;/h4&gt;
&lt;p&gt;At last, I worked on &lt;strong&gt;KFileMetaData&lt;/strong&gt;. This library is used to extract metadata from files, such as images, videos, documents, etc. Same as KDE Thumbnailers, it handles untrusted input from various file formats, so fuzzing it is important to ensure it can handle malformed or unexpected data gracefully.&lt;/p&gt;
&lt;p&gt;Initially, I made a single fuzzer that used Qt plugin system to load metadata extractors and ran the extractors based on content mimetype. However, this required using dynamic libraries which is not great for OSS-Fuzz integration. So I split the fuzzer into multiple targets, one for each extractor, and compiled them statically. This way, each fuzzer is focused on a specific extractor and doesn&amp;rsquo;t depend on dynamic linking.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://amazingakai.github.io/images/gsoc-2025-oss-fuzz-kfilemetadata-fuzzer.png" alt="KFileMetaData Fuzzer"&gt;&lt;/p&gt;
&lt;p&gt;The thumbnailers and kfilemetadata currently have the highest coverage among all the fuzzers I&amp;rsquo;ve created so far, which is great! The coverage will improve and reach closer to 100% for them as the corpus grows on OSS-Fuzz.&lt;/p&gt;
&lt;h3 id="whats-next"&gt;What&amp;rsquo;s Next&lt;/h3&gt;
&lt;p&gt;There are still many more libraries that could benefit from OSS-Fuzz integration. Here are some that I plan to work on next:&lt;/p&gt;
&lt;h4 id="more-thumbnailers"&gt;More Thumbnailers&lt;/h4&gt;
&lt;p&gt;KDE maintains a large number of thumbnailer plugins, and I intend to integrate as many of them as possible. The next ones on my list (provided by Albert Astals Cid) include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/office/calligra/-/tree/master/extras/thumbnail"&gt;Calligra Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/pim/itinerary/-/tree/master/src/thumbnailer"&gt;Itinerary Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/sdk/kde-dev-utils/-/blob/master/kuiviewer/quicreator.cpp"&gt;Qui Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/graphics/kdegraphics-thumbnailers"&gt;KDE Graphics Thumbnailers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/multimedia/kdenlive/-/tree/master/thumbnailer"&gt;MLT Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/sdk/kdesdk-thumbnailers"&gt;KDE SDK Thumbnailers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/network/konqueror/-/tree/master/plugins/webarchiver/thumbnailer"&gt;WebArchive Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/games/palapeli/-/tree/master/mime"&gt;Pala Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invent.kde.org/plasma/plasma-workspace/-/tree/master/kcms/kfontinst/thumbnail"&gt;Font Thumbnailer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="okular-generators--qmobipocket"&gt;Okular Generators &amp;amp; QMobipocket&lt;/h4&gt;
&lt;p&gt;&lt;a href="https://invent.kde.org/graphics/kdegraphics-mobipocket/"&gt;QMobipocket&lt;/a&gt; is a library used by Okular for reading &lt;code&gt;.mobi&lt;/code&gt; files. It parses Mobipocket documents and could benefit from fuzzing to identify edge cases and potential vulnerabilities.&lt;/p&gt;
&lt;p&gt;Okular also includes several &lt;a href="https://invent.kde.org/graphics/okular/-/tree/master/generators"&gt;generators&lt;/a&gt; responsible for rendering various document formats. While most rely on third-party libraries, a few include custom code that has not yet been fuzzed. These components may be susceptible to bugs triggered by malformed files.&lt;/p&gt;
&lt;p&gt;Fuzzing these generators is a bit tricky, since building the full Okular application and all its dependencies would slow down the build process and make its maintenance harder. To address this, I plan to build only the relevant generator source files and their minimal dependencies similar to the approach I used for KDE thumbnailers.&lt;/p&gt;
&lt;h4 id="kcontacts-vcard-parser"&gt;KContacts (VCard Parser)&lt;/h4&gt;
&lt;p&gt;&lt;a href="https://invent.kde.org/frameworks/kcontacts"&gt;KContacts&lt;/a&gt; is a KDE framework for handling contact data. It includes a VCard parser that reads &lt;code&gt;.vcf&lt;/code&gt; files. Although the format is relatively simple, it supports multiple character encodings and codecs, making it an interesting candidate for fuzz testing.&lt;/p&gt;
&lt;h3 id="links"&gt;Links&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Intro Blog post: &lt;a href="https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries"&gt;amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s it for now. If you&amp;rsquo;re working on/know a KDE library that touches untrusted input and could benefit from fuzzing, please let me know! You can reach me on &lt;a href="https://matrix.to/#/@azharmomin:kde.org"&gt;Matrix&lt;/a&gt; or &lt;a href="mailto:azhar.momin@kdemail.net"&gt;Email&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>GSoC 2025: Expanding OSS-Fuzz Integration Across KDE Libraries</title><link>https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries/</link><pubDate>Tue, 13 May 2025 20:00:00 +0530</pubDate><guid>https://amazingakai.github.io/posts/gsoc-2025-expanding-oss-fuzz-integration-across-kde-libraries/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Hello! I&amp;rsquo;m Azhar, a Computer Science student who loves OSS projects and contributing to KDE. This summer, I&amp;rsquo;m excited to be working on the &lt;a href="https://summerofcode.withgoogle.com/programs/2025/projects/HGa6a2Vn"&gt;Google Summer of Code (GSoC) project&lt;/a&gt; at &lt;a href="https://community.kde.org"&gt;KDE Community&lt;/a&gt; to integrate more KDE libraries into OSS-Fuzz.&lt;/p&gt;
&lt;p&gt;While KDE already has some libraries integrated into OSS-Fuzz, such as &lt;a href="https://invent.kde.org/frameworks/karchive"&gt;KArchive&lt;/a&gt;, &lt;a href="https://invent.kde.org/frameworks/kimageformats"&gt;KImageFormats&lt;/a&gt;, and &lt;a href="https://invent.kde.org/frameworks/kcodecs"&gt;KCodecs&lt;/a&gt;, there are many more libraries that could benefit from this integration. The goal of this project is to expand the coverage of OSS-Fuzz across KDE libraries, making them more secure and reliable.&lt;/p&gt;
&lt;h2 id="what-is-oss-fuzz"&gt;What is OSS-Fuzz?&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/google/oss-fuzz"&gt;OSS-Fuzz&lt;/a&gt; is a SaaS by Google to automatically find bugs and vulnerabilities in open-source projects through fuzz testing. Fuzzing involves feeding random or unexpected data into a software to uncover vulnerabilities that might otherwise go unnoticed. OSS-Fuzz continuously runs fuzz tests on the integrated open-source projects, reporting any crashes or issues found. This helps maintainers identify and fix bugs quickly, improving the overall quality of the software.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As of May 2025, OSS-Fuzz has helped identify and fix over 13,000 vulnerabilities and 50,000 bugs across 1,000 projects.&lt;br&gt;
&lt;em&gt;Source: &lt;a href="https://github.com/google/oss-fuzz?tab=readme-ov-file#trophies"&gt;OSS-Fuzz GitHub repository&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="https://amazingakai.github.io/images/gsoc-2025-oss-fuzz-overview.png" alt="Overview of OSS-Fuzz"&gt;&lt;br&gt;
&lt;em&gt;Image from &lt;a href="https://github.com/google/oss-fuzz"&gt;OSS-Fuzz GitHub repository&lt;/a&gt;, licensed under &lt;a href="https://www.apache.org/licenses/LICENSE-2.0"&gt;Apache 2.0&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="project-goals"&gt;Project Goals&lt;/h2&gt;
&lt;p&gt;The main goal of this project is to integrate more KDE libraries into OSS-Fuzz. This involves:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identifying libraries&lt;/strong&gt;: Analyzing the existing KDE libraries and identifying those that would benefit from OSS-Fuzz integration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Creating fuzz targets&lt;/strong&gt;: Writing fuzz targets for the identified libraries. A fuzz target is a specific function or API that will be tested with random data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrating with OSS-Fuzz&lt;/strong&gt;: Setting up the integration with OSS-Fuzz, including creating Dockerfile and a build script.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing and debugging&lt;/strong&gt;: Running the fuzz tests and debugging any issues that arise during the process.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The objective is to integrate as many as KDE libraries possible into OSS-Fuzz by the end of the GSoC period, thereby enhancing the overall security and reliability of KDE software.&lt;/p&gt;
&lt;h2 id="initial-libraries"&gt;Initial Libraries&lt;/h2&gt;
&lt;p&gt;The following libraries have been identified for initial integration into OSS-Fuzz:&lt;/p&gt;
&lt;h3 id="kfilemetadata"&gt;KFileMetaData&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://invent.kde.org/frameworks/kfilemetadata"&gt;KFileMetaData&lt;/a&gt; is a library for reading and writing metadata in files. It supports various file formats, including images, audio, and video files. KFileMetaData is used by &lt;a href="https://invent.kde.org/frameworks/baloo"&gt;Baloo&lt;/a&gt; for indexing purposes. This means that many files may be processed by KFileMetaData without the user&amp;rsquo;s knowledge, making it a critical library to fuzz.&lt;/p&gt;
&lt;h3 id="kmime"&gt;KMime&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://invent.kde.org/frameworks/kmime"&gt;KMime&lt;/a&gt; is a library to assist handling MIME data. It provides classes for parsing MIME messages. KMime is used by various KDE applications, including KMail. This again means that the library may process malformed or unexpected data without the user&amp;rsquo;s knowledge.&lt;/p&gt;
&lt;h3 id="kde-thumbnailers"&gt;KDE-Thumbnailers&lt;/h3&gt;
&lt;p&gt;KDE has many thumbnailer libraries, such as &lt;a href="https://invent.kde.org/graphics/kdegraphics-thumbnailers"&gt;KDE-Graphics-Thumbnailers&lt;/a&gt;. These libraries are used to generate thumbnails for various file formats, including images, videos, and documents. These thumbnailers are used by Dolphin/KIO to generate previews of files and can be exposed to untrusted data.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Integrating KDE libraries into OSS-Fuzz is an important step towards improving the security and reliability of KDE software. Expanding OSS-Fuzz coverage to more libraries will help KDE maintainers quickly identify and fix bugs before they become problems for users.&lt;/p&gt;</description></item></channel></rss>