<?xml version="1.0"?>
<rss version="2.0"><channel><title>KasperskyOS, Development Latest Topics</title><link>https://forum.kaspersky.com/forum/kasperskyos-development-268/</link><description>KasperskyOS, Development Latest Topics</description><language>en</language><item><title>KasperskyOS CE 1.4.0.102: a list of SDK findings (bugs, documentation, missing features) from porting .NET</title><link>https://forum.kaspersky.com/topic/kasperskyos-ce-140102-a-list-of-sdk-findings-bugs-documentation-missing-features-from-porting-net-59824/</link><description><![CDATA[<p>While porting .NET (NativeAOT) to KasperskyOS CE 1.4.0.102, I collected where the SDK behaves differently from POSIX or Linux, or lacks something portable code expects. Most findings are shown by a small program run as the only application in a QEMU image, and most of those also on Linux for comparison; the others by commands run on the installed SDK. <a rel="external nofollow" href="https://FINDINGS.md">FINDINGS.md</a> in <a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks">https://github.com/caraioniurie47/kos-sdk-checks</a> describes each one (the output, what POSIX, NetBSD and Linux do, what it breaks, and for most of them options), and the repository has the programs and scripts that reproduce them; the VfsRamFs crash has a reproducer of its own.</p><p><strong>Bugs</strong></p><ul><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b1">B1</a> — <code>mkstemps()</code> fails with <code>EINVAL</code> for a valid template</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b2">B2</a> — <code>pread</code>, <code>pwrite</code>, <code>ftruncate</code>, <code>fsync</code> fail with <code>ENOSYS</code> on <code>/dev/null</code>, and three of them on pipes</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b3">B3</a> — VfsRamFs: <code>utimensat()</code>, <code>rename()</code> and <code>posix_fallocate()</code> fail unlike POSIX</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b4">B4</a> — VfsRamFs crashes under concurrent stat/readdir/unlink (reported in <a rel="" href="https://forum.kaspersky.com/topic/vfsramfs-crashes-null-dereference-in-inode_destructor-under-concurrent-statreaddirunlink-kasperskyos-ce-140102-59792/">https://forum.kaspersky.com/topic/vfsramfs-crashes-null-dereference-in-inode_destructor-under-concurrent-statreaddirunlink-kasperskyos-ce-140102-59792/</a>)</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b5">B5</a> — <code>shutdown()</code> on an unconnected TCP or UDP socket succeeds</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b6">B6</a> — a socket from <code>accept4()</code> inherits the listener's <code>O_NONBLOCK</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b7">B7</a> — <code>poll()</code> fails with <code>EBADF</code> for a closed descriptor instead of setting <code>POLLNVAL</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b8">B8</a> — a connected UDP socket cannot be disconnected (<code>connect(AF_UNSPEC)</code>)</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b9">B9</a> — a zero-length <code>recv()</code> on an empty non-blocking TCP socket returns 0</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b10">B10</a> — <code>sendto()</code> of zero bytes on UDP returns 0 and sends nothing</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b11">B11</a> — <code>IOV_MAX</code> is 10, and more iovecs give <code>EINVAL</code>, not <code>EMSGSIZE</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b12">B12</a> — a <code>read()</code> or <code>recvmsg()</code> blocked on a socket closed by another thread fails with <code>errno</code> -3</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b13">B13</a> — at the 512-descriptor limit <code>open("/dev/null")</code> fails with <code>ENFILE</code>; <code>getrlimit</code>/<code>setrlimit</code> are not implemented</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b14">B14</a> — <code>sigaction()</code> installs a handler for <code>SIGKILL</code> and <code>SIGSTOP</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b15">B15</a> — <code>mprotect()</code> to read, write and execute fails with <code>ENOMEM</code>, not <code>ENOTSUP</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#b16">B16</a> — <code>dlerror()</code> is declared <code>const char *</code></p></li></ul><p><strong>Documentation errors</strong></p><ul><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#e1">E1</a> — <code>link()</code> fails with <code>ENOSYS</code>, though the manual lists it</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#e2">E2</a> — <code>sendfile()</code> to a TCP socket fails with <code>EINVAL</code>, though the manual lists it</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#e3">E3</a> — the manual documents IPv6 for <code>kos_net.h</code>, but the network stack has no IPv6</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#e4">E4</a> — two typos in log messages</p></li></ul><p><strong>Undocumented behaviour</strong></p><ul><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u1">U1</a> — uid 0 without root's rights, yet <code>unlink()</code> removes directories; directories lose setuid and setgid</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u2">U2</a> — VfsRamFs's <code>statvfs()</code> reports no free space</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u3">U3</a> — <code>readdir()</code> of a removed directory fails with <code>ENOENT</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u4">U4</a> — <code>localhost</code> resolves only from a hosts file given to VfsNet</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u5">U5</a> — <code>FIONREAD</code> on UDP counts 16 bytes more than the datagram</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u6">U6</a> — <code>SO_SNDBUF</code>/<code>SO_RCVBUF</code> of 0 fail with <code>EINVAL</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u7">U7</a> — <code>getsockopt()</code> with a NULL buffer and length 0 fails with <code>EINVAL</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u8">U8</a> — TCP <code>sendmsg()</code> of more than 64 KiB fails with <code>EMSGSIZE</code>, even on a blocking socket</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u9">U9</a> — <code>accept4()</code> with <code>address_len</code> over 128 fails with <code>EACCES</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u10">U10</a> — <code>setsockopt()</code> fails with <code>ECONNRESET</code> after the peer's reset</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u11">U11</a> — <code>accept()</code> with no descriptor left drops the pending connection</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u12">U12</a> — <code>uname()</code> returns constants</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u13">U13</a> — <code>pthread_condattr_init()</code> fails on memory that holds an initialized attribute</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u14">U14</a> — the VFS client waits about 10 s at startup when there is no VFS server</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u15">U15</a> — <code>PROT_NONE</code> reservations take physical memory and seconds; <code>MADV_DONTNEED</code> frees nothing</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u16">U16</a> — when a <code>MAP_NORESERVE</code> write finds no memory, the kernel ends the process</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u17">U17</a> — <code>mprotect()</code> cannot make a read-only page of the program image writable</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u18">U18</a> — <code>aarch64-kos-clang -static-pie</code> links dynamically</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#u19">U19</a> — unprefixed <code>clang</code> and <code>clang-17</code> in <code>toolchain/bin</code> target KasperskyOS</p></li></ul><p><strong>Missing features</strong></p><ul><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m1">M1</a> — <code>SO_REUSEPORT</code> works but no header defines it</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m2">M2</a> — <code>sysconf(_SC_PHYS_PAGES)</code> fails although <code>unistd.h</code> defines the name</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m3">M3</a> — OpenSSL 1.1.1t libraries without headers; OpenSSL 3</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m4">M4</a> — <code>libcrypto.a</code> references a <code>getentropy()</code> that nothing provides</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m5">M5</a> — no GSSAPI or Kerberos library</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m6">M6</a> — functions declared in headers but defined in no library</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m7">M7</a> — no <code>SA_RESETHAND</code> or <code>SA_NODEFER</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m8">M8</a> — no C <code>&lt;uchar.h&gt;</code></p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m9">M9</a> — <code>fallocate()</code> without its <code>FALLOC_FL_*</code> flags</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#m10">M10</a> — commonly probed headers are absent</p></li></ul><p><strong>Proposals</strong></p><ul><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#p1">P1</a> — an API to suspend another thread and read its registers</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#p2">P2</a> — a supported way for an exception handler to resume at a new address with new registers</p></li><li><p><a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/FINDINGS.md#p3">P3</a> — a way to query the CPU's features</p></li></ul><p>Which of these do you plan to fix, which to document, and should any of them get a topic of its own?</p><p><strong>Context</strong></p><p>Found while porting .NET (NativeAOT) to KasperskyOS (latest release: <a rel="external nofollow" href="https://github.com/caraioniurie47/runtime-kos/releases/latest">https://github.com/caraioniurie47/runtime-kos/releases/latest</a>).</p><p>Thanks!</p>]]></description><guid isPermaLink="false">59824</guid><pubDate>Fri, 02 Oct 2026 11:40:13 +0000</pubDate></item><item><title>Socket differences from POSIX/Linux with VfsNet: no IPv6, localhost, sendfile, shutdown, accept4 and O_NONBLOCK, poll &#x2014; KasperskyOS CE 1.4.0.102</title><link>https://forum.kaspersky.com/topic/socket-differences-from-posixlinux-with-vfsnet-no-ipv6-localhost-sendfile-shutdown-accept4-and-o_nonblock-poll-kasperskyos-ce-140102-59810/</link><description><![CDATA[<p><strong>Summary</strong></p><ul><li><p><strong>No IPv6 in this SDK package</strong>: <code>socket(AF_INET6, ...)</code> fails with <code>EAFNOSUPPORT</code>, while the manual documents IPv6 configuration for <code>kos_net.h</code> ("Configure the available network interfaces with IPv4 and IPv6 addressing.", <code>configure_net_iface6()</code>, pp. 124-125 of the 1.4 PDF). Its network stack has no IPv6 library: <code>rumpConfig.cmake</code> adds <code>rump::rumpnet_netinet6</code> only if that target exists, and the sysroot has no <code>librumpnet_netinet6.a</code>.</p></li><li><p><code>localhost</code><strong> resolves only from a hosts file given to VfsNet</strong>: <code>getaddrinfo()</code> runs in VfsNet (the manual lists it under "Functions implemented by the vfs::lib_net library", p. 97), which reads <code>/etc/hosts</code> from its own file systems (in an earlier test of mine, an <code>/etc/hosts</code> in the application's file system changed nothing). The manual's examples list a hosts file among VfsNet's configuration files, but nothing says that name resolution, <code>localhost</code> included, needs one; RFC 6761 (6.3) recommends that resolvers always return the loopback address for <code>localhost</code>.</p></li><li><p><code>sendfile()</code><strong> from a file to a TCP socket fails with </strong><code>EINVAL</code>, although it is declared and defined, so configure checks find it, and the manual's table "Functions implemented by the vfs::lib_fs library" (pp. 96-97) lists it.</p></li><li><p><code>shutdown()</code><strong> on an unconnected socket succeeds</strong>; POSIX says it "shall fail" with <code>ENOTCONN</code>. In NetBSD 10's source it succeeds too: its <code>soshutdown()</code> has no connection check, although its <code>shutdown(2)</code> man page lists <code>ENOTCONN</code>.</p></li><li><p><strong>A socket from </strong><code>accept4()</code><strong> inherits </strong><code>O_NONBLOCK</code> from a non-blocking listener. POSIX.1-2024 says the new socket's <code>O_NONBLOCK</code> "shall be determined solely by the flag argument", and NetBSD's <code>accept4()</code> (its <code>paccept()</code>) clears the inherited flag; only <code>accept()</code> may inherit it.</p></li><li><p><code>poll()</code>: a closed descriptor in the set fails the whole call with <code>EBADF</code> instead of setting <code>POLLNVAL</code> in its entry, as POSIX requires and as NetBSD 10's <code>pollscan</code> does. (More than 512 entries fail with <code>EINVAL</code>, as POSIX requires: <code>OPEN_MAX</code> is 512 in the SDK's <code>limits.h</code>.)</p></li></ul><p><strong>Program</strong></p><p>One program, <a rel="external nofollow" href="https://github.com/caraioniurie47/kos-sdk-checks/blob/main/src/net-check.c">https://github.com/caraioniurie47/kos-sdk-checks/blob/main/src/net-check.c</a>, run as the only application in an image with the SDK's <code>precompiled_vfs::VfsNet</code> as its network backend and <code>precompiled_vfs::VfsRamFs</code> as its file system, after configuring <code>en0</code> as the SDK's network examples do (no hosts file given to VfsNet). The same source ran on Linux for comparison (Ubuntu 22.04, kernel 6.18 under WSL2), with the two <code>kos_net.h</code> calls replaced by stubs. The repository has the image's build files, the scripts that ran both, and the output.</p><p><strong>Output</strong></p><div class="ipsRichText__table-wrapper"><table style="width: 816px;"><colgroup><col style="width:307px;"><col style="width:209px;"><col style="width:300px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Check</p></th><th colspan="1" rowspan="1"><p>KasperskyOS CE 1.4.0.102</p></th><th colspan="1" rowspan="1"><p>Linux</p></th></tr><tr><td colspan="1" rowspan="1"><p><code>socket(AF_INET6, SOCK_STREAM, 0)</code></p></td><td colspan="1" rowspan="1"><p>-1, errno Address family not supported by protocol family</p></td><td colspan="1" rowspan="1"><p>3</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>getaddrinfo("localhost")</code></p></td><td colspan="1" rowspan="1"><p>7, No address associated with hostname</p></td><td colspan="1" rowspan="1"><p>0</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>sendfile(tcp socket, file, &amp;offset, 512)</code></p></td><td colspan="1" rowspan="1"><p>-1, errno Invalid argument</p></td><td colspan="1" rowspan="1"><p>512</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>recv(tcp socket, 81920-byte buffer), 70000 bytes sent</code></p></td><td colspan="1" rowspan="1"><p>32768</p></td><td colspan="1" rowspan="1"><p>70512</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>recv(tcp socket, 65536-byte buffer) after that</code></p></td><td colspan="1" rowspan="1"><p>24576</p></td><td colspan="1" rowspan="1"><p>-1, errno Resource temporarily unavailable</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>shutdown(unconnected TCP socket, SHUT_RDWR)</code></p></td><td colspan="1" rowspan="1"><p>0</p></td><td colspan="1" rowspan="1"><p>-1, errno Transport endpoint is not connected</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>accept4(non-blocking listener, SOCK_CLOEXEC): O_NONBLOCK</code></p></td><td colspan="1" rowspan="1"><p>set</p></td><td colspan="1" rowspan="1"><p>clear</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>poll({open socket, closed descriptor}, 2, 0)</code></p></td><td colspan="1" rowspan="1"><p>-1, errno Bad file descriptor</p></td><td colspan="1" rowspan="1"><p>2</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>revents</code></p></td><td colspan="1" rowspan="1"><p>0x0, 0x0</p></td><td colspan="1" rowspan="1"><p>0x14, 0x20</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>poll(513 entries, every fd -1, timeout 0)</code></p></td><td colspan="1" rowspan="1"><p>-1, errno Invalid argument</p></td><td colspan="1" rowspan="1"><p>0</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>poll(512 entries, every fd -1, timeout 0)</code></p></td><td colspan="1" rowspan="1"><p>0</p></td><td colspan="1" rowspan="1"><p>0</p></td></tr></tbody></table></div><p>The two <code>recv</code> rows are fine on both systems (partial reads are allowed; Linux's 70512 includes the 512 bytes <code>sendfile</code> sent). I included them because an earlier test of mine had <code>recv</code> with a buffer over 64 KiB fail with <code>EINVAL</code>; this program does not reproduce that.</p><p><strong>What each one breaks</strong></p><ul><li><p>IPv6: portable code and test suites often assume at least an IPv6 loopback; many of .NET's socket tests do. Is IPv6 left out of the Community Edition on purpose, or not yet available? Either way, a sentence in the networking documentation would save the search.</p></li><li><p><code>localhost</code>: .NET's socket tests connect to <code>localhost</code> by name, and 26 of them failed. After I gave VfsNet a ROMFS <code>/etc/hosts</code> with <code>127.0.0.1 localhost</code> (as the SDK's <code>net_with_separate_vfs</code> example does for its own hosts), those tests, run again alone, no longer failed: 20 passed, and 4 skipped because <code>localhost</code> has no IPv6 address (the 2 IPv6 cases among the 26 are no longer run, as there is no IPv6). Could the documentation say that name resolution, <code>localhost</code> included, needs a hosts file for VfsNet or DNS?</p></li><li><p><code>sendfile</code>: <code>Socket.SendFile</code> in .NET threw "Invalid argument"; my port now copies with <code>read</code> and <code>write</code> on KasperskyOS.</p></li><li><p><code>shutdown</code>: .NET's <code>Socket.Disconnect</code> on an unconnected socket does not throw.</p></li><li><p><code>accept4</code> and <code>O_NONBLOCK</code>: .NET clears the flag after <code>accept()</code> on macOS and FreeBSD, but on a system with <code>accept4</code> it assumes Linux behaviour. On KasperskyOS its synchronous reads on accepted sockets then failed with "Operation timed out" (its blocking-mode <code>EAGAIN</code>), until my port cleared the flag there too. Could <code>accept4</code> take <code>O_NONBLOCK</code> from its flags only, as POSIX requires and NetBSD does?</p></li><li><p><code>poll</code>: an event loop that polls many sockets while other threads close them gets whole-call failures instead of per-descriptor <code>POLLNVAL</code>. My port polls each descriptor alone after a failure to find the closed one, and splits the set into chunks of 512 (<code>OPEN_MAX</code>). The POSIX implementation specifics page says only that invalid handles combined with a negative (unlimited) timeout make <code>poll()</code> fail with <code>EINVAL</code>; the program above uses a zero timeout.</p></li></ul><p>Could <code>sendfile</code> work for sockets (or be left out of the headers and libraries), could <code>accept4</code> follow POSIX, could <code>shutdown</code> and <code>poll</code> either follow POSIX here or have their behaviour documented, and could the others be documented?</p><p><strong>Context</strong></p><p>Found while running .NET's <a rel="external nofollow" href="https://System.Net">System.Net</a>.Sockets test suite on a KasperskyOS port of .NET (NativeAOT; latest release: <a rel="external nofollow" href="https://github.com/caraioniurie47/runtime-kos/releases/latest">https://github.com/caraioniurie47/runtime-kos/releases/latest</a>).</p>]]></description><guid isPermaLink="false">59810</guid><pubDate>Wed, 30 Sep 2026 10:27:36 +0000</pubDate></item><item><title>VfsRamFs crashes (NULL dereference in inode_destructor) under concurrent stat/readdir/unlink &#x2014; KasperskyOS CE 1.4.0.102</title><link>https://forum.kaspersky.com/topic/vfsramfs-crashes-null-dereference-in-inode_destructor-under-concurrent-statreaddirunlink-kasperskyos-ce-140102-59792/</link><description><![CDATA[<p><strong>Summary</strong></p><p>- On KasperskyOS Community Edition <strong>1.4.0.102</strong> (QEMU, aarch64), the prebuilt <strong>VfsRamFs</strong> takes an unhandled page fault (a NULL pointer dereference) when several threads of one client create, stat, list and unlink files in <code>/tmp</code> at the same time.</p><p>- The kernel then terminates VfsRamFs, so its client loses its file system <code>[VFS_CLIENT] Connection to vfs lost.</code> on every later call).</p><p>- A reproducer in plain C (https://github.com/caraioniurie47/kos-vfsramfs-repro) needs only the SDK. With <code>THREADS=4</code> (12 worker threads) it faulted in the first round in 3 of 3 runs; with <code>THREADS=1</code> (3 worker threads) both runs completed.</p><p>- The call trace points to the release of an inode: <code>_vfs_unlinkat</code> → <code>dentry_free</code> → <code>KosPutObject</code> → <code>inode_destructor</code>, which follows a NULL list node.</p><p><strong>Reproducer:</strong> https://github.com/caraioniurie47/kos-vfsramfs-repro</p><p>One program, <code>repro.Stress</code>, whose file system is the SDK's prebuilt <code>precompiled_vfs::VfsRamFs</code>; the security policy grants everything. In each of 20 rounds it creates 3000 files in each of <code>THREADS</code> directories under <code>/tmp</code>, then per directory one thread <code>stat</code>s 6000 names (half never exist), one lists the directory 20 times, and one unlinks the files (every 7th while holding it open). Clone it, then build and run with the SDK's CMake:</p><p>```</p><p>git clone https://github.com/caraioniurie47/kos-vfsramfs-repro.git</p><p>cd kos-vfsramfs-repro</p><p>$SDK/toolchain/bin/cmake -B build -D CMAKE_TOOLCHAIN_FILE=$SDK/toolchain/share/toolchain-aarch64-kos.cmake -D THREADS=4</p><p>$SDK/toolchain/bin/cmake --build build --target sim</p><p>```</p><p><code>THREADS</code> (1-4) is the number of directories stressed at once; each adds three threads (stat, readdir, unlink). The program prints <code>[stress] round N: ...</code> as it goes and <code>[stress] DONE</code> at the end.</p><p><strong>Fault report</strong> (first <code>THREADS=4</code> run; some header lines, registers and stack words trimmed):</p><p>```</p><p>[stress] 4 directories, 3000 files, 12 threads during stat/readdir/unlink</p><p>[stress] round 1: create</p><p>[stress] round 1: stat + readdir + unlink</p><p>[VMM ] Unhandled Page Fault, address: 0x88</p><p>Exception class: Data Abort from a lower Exception level</p><p>Access type: read</p><p>Fault type: L3 Translation fault</p><p>EIID : kl.VfsRamFs</p><p>Path : VfsRamFs</p><p>TID : 30</p><p>pc : 0xd2a74</p><p>sp: 0x000000000192ac40, lr: 0x00000000000d290c, pc: 0x00000000000d2a74</p><p>Relocation base: &lt;0x0000000000010000&gt;</p><p>Call Trace (User Mode):</p><p>[&lt;0x00000000000d2a74&gt;] ???</p><p>[&lt;0x00000000000d2e74&gt;] ???</p><p>[&lt;0x00000000000df790&gt;] ???</p><p>[&lt;0x00000000000f9094&gt;] ???</p><p>[&lt;0x00000000000f902c&gt;] ???</p><p>[&lt;0x00000000000cf598&gt;] ???</p><p>[&lt;0x00000000000d7bb0&gt;] ???</p><p>[&lt;0x0000000000093ba8&gt;] ???</p><p>[&lt;0x00000000000af9c8&gt;] ???</p><p>[&lt;0x00000000000ae55c&gt;] ???</p><p>[&lt;0x00000000001b31e4&gt;] ???</p><p>Terminating task.</p><p>Terminating thread.</p><p>[2026-09-23T21:40:38.060][Error][repro.Stress][16:34][VFS_CLIENT] Connection to vfs lost.</p><p>```</p><p><strong>Call trace, named.</strong> The shipped <code>sysroot-aarch64-kos/bin/VfsRamFs</code> is stripped, so I named the frames by matching the instructions before each return address against the SDK's static libraries, which keep their symbols. Addresses are as the fault report prints them (the relocation base is 0x10000); where a sequence occurs in more than one function, all candidates are listed:</p><p>| Address | Function (library) |</p><p>|---|---|</p><p>| <code>0xd2a18</code> … <code>0xd2ae0</code> (fault) | <code>inode_destructor</code> (libvfs_fs, libvfs_imp; same instructions as <code>dentry_lru_get</code>) |</p><p>| <code>0xd2e74</code> | inside <code>inode_new</code> (libvfs_fs) |</p><p>| <code>0xdf790</code> | near <code>vfs_object_allocator_init</code> (libvfs_local_common): an object's release callback |</p><p>| <code>0xf9094</code>, <code>0xf902c</code> | <code>KosPutObject</code> (libkos) |</p><p>| <code>0xcf598</code> | <code>dentry_free</code> (or <code>_vfs_getdents_filldir</code>, <code>dentry_read_root</code>) (libvfs_fs) |</p><p>| <code>0xd7bb0</code> | <code>_vfs_unlinkat</code> (libvfs_fs) |</p><p>| <code>0x93ba8</code>, <code>0xaf9c8</code> | request dispatch (libvfs_server) |</p><p>The faulting loop walks a list linked at offset 0x80 of each node and reads offsets 0x70 and 0x88; the fault addresses were <code>0x70</code> and <code>0x88</code>, so a node pointer in that list was NULL. The faulting pc varied between runs <code>0xd2a18</code>, <code>0xd2a24</code>, <code>0xd2a74</code>, <code>0xd2ae0</code>), always inside the same function. In one run the destructor was reached from a different caller <code>0xdf508</code>, near <code>vfs_notice_init</code> in libvfs_local_common) instead of <code>_vfs_unlinkat</code>. It looks like a race on the inode or dentry lists when the last reference to an inode is dropped, but I can only see it from outside.</p><p>Simpler cases did not fault: unlink or rmdir of an open, empty or non-empty directory from one thread, and four threads doing mkdir/open/unlink/close 300 times each. In one run of an earlier version of the stress program (1500 files per directory), there was no fault report; instead the program made no progress for 600 seconds.</p><p><strong>Thread limit.</strong> The SDK 1.4 page "Limitations and known issues" (https://support.kaspersky.com/kos-community-edition/1.4/limitations_and_known_problems) states: "The libc library API supported by VFS has a limit of 30 VFS clients and 5 threads per client." With <code>THREADS=1</code> the process has 4 threads, within that limit, and both runs completed all 20 rounds; I have not seen the fault within the limit. With <code>THREADS=4</code> it has 13. Even so, a client over the limit takes the file system server down rather than getting an error.</p><p><strong>Context</strong></p><p>Found while running the .NET runtime's <a rel="external nofollow" href="https://System.IO">System.IO</a>.FileSystem test suite on a KasperskyOS port of .NET (NativeAOT; latest release: https://github.com/caraioniurie47/runtime-kos/releases/tag/release_v03): one of six full runs lost its file system when VfsRamFs faulted with the call trace above. The .NET runtime starts threads of its own (a finalizer thread, and thread pool threads on demand), so a managed app does not control how many of its threads call into VFS, and a limit of 5 threads per VFS client is hard for it to stay within; if a client goes over it, an error would be much easier to handle than a server fault.</p><p>Is this a known issue, and is there a workaround until a fix, for example a VfsRamFs setting or a way to serialize requests on the client side?</p><p>Thanks!</p>]]></description><guid isPermaLink="false">59792</guid><pubDate>Thu, 24 Sep 2026 07:24:36 +0000</pubDate></item><item><title>Compatibility and Performance of KasperskyOS on Intel Evo Platforms</title><link>https://forum.kaspersky.com/topic/compatibility-and-performance-of-kasperskyos-on-intel-evo-platforms-50097/</link><description><![CDATA[<p>
	Hello KasperskyOS Development Community,
</p>

<p>
	I'm interested in deploying KasperskyOS on a new laptop that features the <strong><a href="https://www.lenovo.com/us/en/faqs/intel-evo/" rel="external nofollow">Intel Evo</a></strong> platform. As you may know, Intel Evo is designed to provide enhanced performance, responsiveness, and battery life for modern laptops. I'm particularly curious about how well KasperskyOS can leverage the hardware optimizations and features of Intel Evo-certified devices.
</p>

<p>
	Key Features of My Setup:
</p>

<ul>
	<li>
		Processor: Intel Core i7 (11th Gen or newer) with Intel Evo certification
	</li>
	<li>
		RAM: 16GB DDR4
	</li>
	<li>
		Storage: 512GB NVMe SSD
	</li>
	<li>
		Graphics: Integrated Intel Iris Xe Graphics
	</li>
	<li>
		Operating System Considerations: Planning to dual-boot KasperskyOS and Windows 11
	</li>
</ul>

<p>
	I would greatly appreciate any insights or experiences you could share regarding deploying and developing KasperskyOS on Intel Evo-certified laptops. Your advice will help me determine the best approach to set up a secure, high-performance development environment.
</p>

<p>
	Thank you for your help!
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">50097</guid><pubDate>Mon, 26 Aug 2024 07:03:03 +0000</pubDate></item><item><title>Can KasperskyOS Be Adapted for Secure E-commerce Sites Selling Niche Products?</title><link>https://forum.kaspersky.com/topic/can-kasperskyos-be-adapted-for-secure-e-commerce-sites-selling-niche-products-54302/</link><description><![CDATA[<p>
	Hi everyone,
</p>

<p>
	I’m exploring how <strong>KasperskyOS</strong> could potentially support highly secure e-commerce platforms, especially for niche markets like ours.
</p>

<p>
	Given the increasing security concerns around customer data, transaction safety, and supply chain integrity, would KasperskyOS be a viable option for developing a secure online store?
</p>

<ul>
	<li>
		Has anyone here used KasperskyOS for web-based or e-commerce applications?
	</li>
	<li>
		What challenges should we expect if we consider it for a fashion retail platform?
	</li>
	<li>
		Is it overkill for this type of business, or could its microkernel architecture be a smart long-term investment?
	</li>
</ul>

<p>
	I’d love to hear your insights or any experiences you’ve had applying KasperskyOS outside of industrial or IoT environments.
</p>

<p>
	Thanks in advance!
</p>
]]></description><guid isPermaLink="false">54302</guid><pubDate>Thu, 20 Mar 2025 04:22:54 +0000</pubDate></item><item><title>Kaspersky OS for personal use?</title><link>https://forum.kaspersky.com/topic/kaspersky-os-for-personal-use-49508/</link><description><![CDATA[<p>
	Hi, 
</p>

<p>
	I just want ask if Kaspersky OS will be available on personal computers? I mean similar OS like windows or Linux? Or only for IoT? 
</p>
]]></description><guid isPermaLink="false">49508</guid><pubDate>Fri, 02 Aug 2024 21:26:14 +0000</pubDate></item><item><title>Add another entitlement to the license</title><link>https://forum.kaspersky.com/topic/add-another-entitlement-to-the-license-51731/</link><description><![CDATA[<p>
	Hello,
</p>

<p>
	 I am currently an infrastructure analyst. The old technician wants to add me to his company management license. How should it be done so that I can manage the company like him?
</p>

<p>
	Thanks and regards,
</p>
]]></description><guid isPermaLink="false">51731</guid><pubDate>Thu, 24 Oct 2024 14:42:18 +0000</pubDate></item><item><title>Information about KasperskyOS Community Edition</title><link>https://forum.kaspersky.com/topic/information-about-kasperskyos-community-edition-49464/</link><description><![CDATA[<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	<strong>KasperskyOS Community Edition</strong> is a publicly available version of <strong>KasperskyOS</strong> that is designed to help you master the main principles of application development under <strong>KasperskyOS</strong>. <strong>KasperskyOS Community Edition</strong> will let you see how the concepts rooted in <strong>KasperskyOS</strong> actually work in practical applications. <strong>KasperskyOS Community Edition</strong> includes sample applications with source code, detailed explanations, and instructions and tools for building applications.
</p>

<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	<strong>KasperskyOS Community Edition</strong> will help you:
</p>

<ul>
	<li style="vertical-align:middle;">
		<span style="font-size:11pt;">Learn the principles and techniques of "secure by design" development based on practical examples;</span>
	</li>
	<li style="vertical-align:middle;">
		<span style="font-size:11pt;">Explore KasperskyOS as a potential platform for implementing your own projects;</span>
	</li>
	<li style="vertical-align:middle;">
		<span style="font-size:11pt;">Make prototypes of solutions (primarily Embedded/IoT) based on <strong>KasperskyOS</strong>;</span>
	</li>
	<li style="vertical-align:middle;">
		<span style="font-size:11pt;">Port applications/components to <strong>KasperskyOS</strong>;</span>
	</li>
	<li style="vertical-align:middle;">
		<span style="font-size:11pt;">Explore security issues in software development.</span>
	</li>
</ul>

<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	The distribution kit of <strong>KasperskyOS Community Edition</strong> includes the following:
</p>

<ul type="disc">
	<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
		<span style="font-size:11pt;">DEB package for installation of <strong>KasperskyOS Community Edition</strong>, including:</span>

		<ul type="circle">
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">Image of the <strong>KasperskyOS</strong> kernel;</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">Development tools (compiler, linker, binutils toolset, QEMU emulator, and accompanying tools)</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">Utilities and scripts (for example, source code generators, makekss script for creating the Kaspersky Security Module, and makeimg script for creating the solution image);</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">A set of libraries that provide partial compatibility with the POSIX standard;</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">Drivers;</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">System programs (for example, virtual file system);</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">Usage examples for components of <strong>KasperskyOS Community Edition</strong>;</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">End User License Agreement;</span>
			</li>
			<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
				<span style="font-size:11pt;">Information about third-party code (Legal Notices);</span>
			</li>
		</ul>
	</li>
	<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
		<span style="font-size:11pt;"><strong>KasperskyOS Community Edition</strong> Developer's Guide (Online Help);</span>
	</li>
	<li lang="en-us" style="vertical-align:middle;" xml:lang="en-us">
		<span style="font-size:11pt;">Release Notes.</span>
	</li>
</ul>

<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	More information: <a href="https://os.kaspersky.com/development/" rel="external nofollow">https://os.kaspersky.com/development/</a>.
</p>

<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	If you have questions, find a bug, or want to make a feature request, please use this forum.
</p>

<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	 
</p>

<p lang="en-us" style="font-size:11pt;" xml:lang="en-us">
	© 2024 AO Kaspersky Lab
</p>
]]></description><guid isPermaLink="false">49464</guid><pubDate>Thu, 01 Aug 2024 14:24:58 +0000</pubDate></item></channel></rss>
