github ossec/ossec-hids 4.5.0

one hour ago

OSSEC changelog (4.5.0) support@atomicorp.com

Release Maintainers

Scott R. Shinn (https://www.atomicorp.com)

Contributors on this release

Release Notes

4.5.0 changes

General

  • @atomicturtle - PR 2458 - Build ossec-authd with OpenSSL 4. The certificate IP check uses the ASN.1 string accessors, and the SSL context is TLS 1.2 through TLS_method() because TLSv1_2_method() is gone
  • @atomicturtle - PR 2348 - Keep the device hostname from agent-forwarded syslog lines for <hostname> matching; expose the OSSEC agent as agent_name / <agent_name>, match log paths with <location> / <location_pcre2>, and keep JSON/diff keyed on the agent identity (#1668)
  • @atomicturtle - PR 2343 - Follow-up fixes from review of the 4.4.0 changes: Solaris ginstall is required up front, remoted reads notify_time at startup, date-based logcollector reopen honors the open-attempt limit, Windows wildcard paths stay literal, the agent-table upgrade constraint is limited to agent, the Windows install ACL is reset before the allow-list, agent-auth accepts either path separator, and realtime FIM stops retrying a file that stays unreadable
  • @atomicturtle - PR 2341 - Rotate ossec.log on the daily monitord pass into logs/ossec/YYYY/Mon/ossec-DD.log, then sign and compress it with the alert logs. Drop it from logrotate so copytruncate no longer races that file (#704)
  • @atomicturtle - PR 2336 - Ignore the Windows Application Experience :Win32App_1 NTFS stream in rootcheck (#758)
  • @atomicturtle - PR 2327 - Honor monitord.notify_time for agent_control status and remoted send eligibility, not only monitord disconnect alerts (#874, #1022)
  • @atomicturtle - PR 2326 - Allow CDB <list> matching on decoded system_name via field="system_name" (#628)
  • @atomicturtle - PR 2322 - Windows agent install ACL allows only SYSTEM and Administrators (#182)
  • @atomicturtle - PR 2320 - ossec-regex -p tests a pattern as PCRE2, with the same flags as a <pcre2> rule (#1845)
  • @atomicturtle - PR 2318 - Extract User-Agent (and action/srcport) from default IIS W3C access logs (#989)
  • @atomicturtle - PR 2324 - Allow silent Windows agent installs to skip IIS logging and integrity checking via /IISLogging=no and /IntegrityChecking=no (#1000)
  • @atomicturtle - PR 2331 - Optional <report_new_files_as_changed> so post-baseline FIM creates are stored as !+++ and listed by syscheck_control -i (#1831)

Security Fixes

  • @atomicturtle - PR 2481 - Keep content hashes out of the report_changes diff command line. seechanges_addfile() named its temporary links after the SHA-256 of the old and new snapshots and passed those paths to system("diff ..."), so any local user could read the unsalted hash of monitored (including root-only) files from ps / /proc. The links are now syscheck-changes-<pid>-{old,new,diff} (ANT-2026-FZNF7ML7)

  • @atomicturtle - PR 2480 - Keep the full file path in Unix FIM messages. read_file() and realtime_checksumfile() formatted <checksums> <path> with a stale 916/912 snprintf limit into an OS_MAXSTR buffer, so paths longer than about 757 characters were cut and every file under such a directory reached the manager under one truncated name that auto_ignore then muted. Those calls now use OS_MAXSTR like the Windows branches (ANT-2026-CH7FO833)

  • @atomicturtle - PR 2479 - Free realtime inotify watch paths when directories disappear. realtime_adddir() stored every watch path in dirtb, but realtime_process() never removed entries for nameless IN_IGNORED events, so a local user who could mkdir/rmdir under realtime="yes" grew root ossec-syscheckd without bound. IN_IGNORED now deletes and frees the entry, named events skip a missing watch, and IN_Q_OVERFLOW also purges stale descriptors (ANT-2026-ODWFEHAC)

  • @atomicturtle - PR 2478 - Rescan realtime directories when the Linux inotify queue overflows. realtime_process() ignored the kernel IN_Q_OVERFLOW marker (wd=-1, no name), so events dropped from the shared queue were never logged or recovered until the next scheduled scan. Overflow now logs once and reuses the deferred rt_overflow_schedule() recovery already used on Windows, keeping CHECK_REALTIME on Linux so lost subdirectory creates still get watches (ANT-2026-NCIMIJXH)

  • @atomicturtle - PR 2477 - Hash Windows registry values in binary mode so a Ctrl-Z in a value name or string cannot hide later values. syscheck_sum.tmp was written and read in text mode, and on Windows the CRT treats 0x1a as EOF, so the MD5/SHA1 stopped early and no integrity alert fired. The checksum temp and syscheckregistry.db now use binary opens; keys without Ctrl-Z keep the same digests (ANT-2026-QL3RS46Y)

  • @atomicturtle - PR 2476 - Skip Windows registry subkeys whose path no longer fits MAX_KEY. os_winreg_querykey() opened the truncated snprintf result, so when the parent path was already 2047 characters the "subkey" was the parent again and the walk recursed until the syscheck thread stack ran out. Both the open path and the HKEY_-prefixed full name are checked; an over-long key is logged with SK_REG_LONG and ignored (ANT-2026-SI19UF16)

  • @atomicturtle - PR 2475 - Keep large registry value buffers off the recursive Windows FIM stack. os_winreg_querykey() held about 38 KB of RegEnumValue buffers on every frame, so roughly 55 nested keys under a monitored windows_registry entry overflowed the 2 MB syscheck thread and killed ossec-agent.exe. Value hashing now runs in a non-recursive helper, and the subkey path buffers are heap-allocated for the walk (ANT-2026-583M5XOX)

  • @atomicturtle - PR 2474 - Keep the last known FIM hash when a scan yields the xxx placeholder (for example a symlink whose target is gone). fim_sum_has_real_change() treats any hash transition involving xxx as quiet, and callers then stored the new sum, so retargeting a monitored link through a missing path (A → xxx → B) never compared A with B and raised no rule 550. fim_sum_keep_hashes() now carries real digests over placeholders in c_read_file() and DB_ProcessFoundEntry() before compare and store (ANT-2026-YO3OMSC0)

  • @atomicturtle - PR 2473 - Stop a crafted rootcheck path from spoofing SyscheckFile fields. rk_extract_hashes() ended the path at the first quote and took each hash from the first MD5/SHA1/SHA256 label, so a directory name that embeds those tokens could replace the real path and digests in alerts.json. The decoder now keeps only a complete hex triple at the end of Rootkit/Anomaly/Trojaned messages and ends the path at the fixed text in front of it; a truncated hash-less Anomaly message is marked with ... so a cut path cannot fake that ending (ANT-2026-0UFTKHQJ)

  • @atomicturtle - PR 2472 - Forward every complete line from a syslog-over-TCP recv(). ossec-remoted cut at the first newline and parked the rest without scanning again, so lines that shared a segment were glued onto the next segment as one event, or dropped on close, CRLF, or a full buffer. The worker now appends into the incomplete prefix and drains every complete line before the next read (ANT-2026-2BEPXI8W)

  • @atomicturtle - PR 2471 - Stop daily reports from leaking per alert in ossec-monitord. os_ReportdStart() left the OS_StrBreak() group array and the top-entry list nodes behind; with reports running in a thread that memory stayed for the life of the daemon. The group array is freed after the loop, and each top-entry list's nodes are released with the hash table (covered with ANT-2026-AVE66YB6) (ANT-2026-M3W3LJEQ)

  • @atomicturtle - PR 2470 - Bound every plain SMTP socket in ossec-maild and ossec-monitord to 60 seconds per reply or write. OS_Sendmail() read through a bare recv() with no timeout, so a relay that accepted and stayed silent held a sender thread forever. After maild.max_workers such threads, no further alert e-mail was sent until ossec-maild was restarted. A timed-out read fails like any other failed reply and releases the worker (ANT-2026-FR6DKH31)

  • @atomicturtle - PR 2469 - Keep a timed-out active response listed until its delete has exited. ossec-execd forked delete and dropped the entry at once, so the next alert for that address could run add while delete was still running. A set-style target such as hosts.deny or a PF table then lost the block, and later alerts skipped the script because execd still listed the address. A request for that same script and address now waits for the in-flight delete and is then a new block. A request for a different address does not wait (ANT-2026-8WBHQ0QF)

  • @atomicturtle - PR 2468 - Keep a backslash-escaped space inside one ossec-execd argument. OS_Exec() escaped a syscheck file name, but ExecdStart() cut the request at every space and passed the pieces to execv(). A space in a monitored name became an extra argument of a root script that expects filename, for example /etc/shadow or -f. The name still arrives escaped (/srv/uploads/x\ /etc/shadow). A location that ends in a backslash is dropped, because it would join with the file name. A location that contains a backslash and a space stays one argument. Windows ossec-execd already keeps the remainder of the request as one quoted field (ANT-2026-Z12L5BYR)

  • @atomicturtle - PR 2467 - Give ossec-execd one spelling of a literal address before it compares, stores, or runs a block. 2001:DB8::7 and 2001:db8::7 were two timeouts, so pf.sh deleted the one PF entry at the first timeout while execd still counted the other spelling as blocked. Later alerts then skipped the add. A ::ffff: address is handed to the script as its IPv4 form, which is what analysisd already does. Host names, -, CIDR, and a leading ! are unchanged (ANT-2026-PTTDW7PW)

  • @atomicturtle - PR 2466 - Keep the closing quote when ossec-dbd stores a long srcip or dstip. sql_nullable_str() wrote the address into a 49-byte buffer, so 47 characters or more cut off the quote and both MySQL and PostgreSQL rejected the INSERT. The address is now cut to the 46-character column width and the alert is stored. The full log line is unchanged (ANT-2026-SEE999RQ)

  • @atomicturtle - PR 2465 - Widen the MySQL location id from SMALLINT UNSIGNED to INT UNSIGNED. location.id stopped at 65,535, so one agent sending a new location per alert filled the counter and ossec-dbd then dropped every alert whose location was not already stored. Existing databases stay 16-bit until upgrade-location-id-mysql.sql is applied. PostgreSQL already uses SERIAL (ANT-2026-C82AB02V)

  • @atomicturtle - PR 2464 - Do not follow a symlink when ossec-dbd reads queue/agent-info. That directory belongs to ossecr and ossec-dbd runs as root, so stat and fopen copied the first line of the link target into the agent table, including a root-only file. A keepalive is stored only when it is one regular file (ANT-2026-5Z4OX04E)

  • @atomicturtle - PR 2463 - Do not follow a symlink when manage_agents removes an agent database. delete_syscheck() and delete_rootcheck() opened fixed names under queue/syscheck and queue/rootcheck with fopen in write mode. Those directories belong to ossec, and manage_agents still runs as root, so a link planted there truncated or created any file under the install, including etc/ossec.conf. The cleanup now truncates only a regular file with a single link and does not create a missing name (ANT-2026-AJJELLSQ)

  • @atomicturtle - PR 2462 - Stop one wildcard <location> from opening every match. logcollector.max_wildcard_files (default 256) keeps the first matches and logs the rest. ossec-logcollector raises its open-file limit to the number of configured files plus 128, so several wildcard blocks still leave room for later logs, commands, and ossec.log. A pattern that already matches more than 256 files monitors only the first 256 until the option is raised (ANT-2026-9KNXMD94)

  • @atomicturtle - PR 2461 - Read a date-based log to its current end before the expanded name changes. update_fname() was closing the old file at the start of the poll, so lines written in the last loop_timeout never reached ossec-analysisd. The lines are read while the location is still the old name. A name that has not changed is left alone (ANT-2026-YGX1KKKT)

  • @atomicturtle - PR 2460 - Forward the first JSON syslog_output alert written after alerts.json rotates or is truncated. jqueue_next() left JQUEUE_READ_FAILED set when the new file was still empty, and the next call parsed a good alert and deleted it. The alert stayed in alerts.json and still drove mail, the database, and active response (ANT-2026-NCEH7RB6)

  • @atomicturtle - PR 2459 - Keep real syslog_output fields whose text happens to look like a placeholder. The default, CEF, and Splunk formatters dropped a value when a single character lined up with (none), (no user), or unknown, so a user named anna, a host inn.example.org, or a location starting with (n never reached the receiver. Only the exact strings (none) and (no user) are left out. A user named unknown is still forwarded (ANT-2026-9Q8LR4NY)

  • @atomicturtle - PR 2457 - Flatten CR and LF in every syslog_output alert, including UDP. TCP already replaced them with spaces so one alert stayed one frame; UDP sent the breaks, and a receiver that splits a datagram at newlines could store a line the manager never raised. UDP does not add a trailing newline. Receivers that relied on the line breaks inside a UDP default or splunk message, present since 3.4.0, now see spaces (ANT-2026-Q0UYTPGC)

  • @atomicturtle - PR 2456 - Do not match a <field> rule when the decoder has no field table. OS_CheckIfRuleMatch() read fields[] for every such rule, and that table exists only for a decoder with <order>, so one log line stopped ossec-analysisd. A decoder that has the named field still matches (ANT-2026-R3ZY7CWM)

  • @atomicturtle - PR 2455 - Decode a certificate common name to UTF-8 before agent-auth -v compares it with the manager host name. asn1_to_cstr() was copying the raw content bytes, so a BMPString or UniversalString whose bytes spelled the host name was accepted. An IA5String, PrintableString, or UTF8String host name is unchanged (ANT-2026-5BG289FD)

  • @atomicturtle - PR 2454 - Stop the Windows event-log message-DLL cache from storing a new entry for every letter-case spelling of one installed source. el_getEventDLL() still opens the registry with the name as written, and stops storing new entries after 4096. The extra key copy in that cache and in the Vista security descriptions is no longer leaked (ANT-2026-ZNO1MXTC)

  • @atomicturtle - PR 2453 - Update the inotify watch path when a realtime directory is renamed. The watch follows the inode, so realtime_adddir() was keeping the first name it stored and later events were built under a path that no longer exists. A stored name that still reaches the same directory, such as a symlink, is left as it is (ANT-2026-16QLZ097)

  • @atomicturtle - PR 2452 - When realtime syscheck finds a directory where it had cached a file, report the file deleted and scan the directory. c_read_file() was reporting that directory as a changed file, so files created inside it were invisible to realtime FIM until the next scheduled scan. The report_changes snapshot for the old file is removed with that deletion, before the new directory is scanned (ANT-2026-DXPIRJGM)

  • @atomicturtle - PR 2451 - Read a newly opened daily alerts file from the start in Read_FileMon(). csyslogd, maild, and dbd were seeking to the end when the day changed or the file was not open yet, so alerts written in that window were never mailed, forwarded, or stored. A daemon start still tails the file (ANT-2026-7ODKFI8F)

  • @atomicturtle - PR 2450 - Report an agent disconnect as (name) ip->ossec-monitord so an IPv6 address is not cut at its first colon. Rule 504 now fires for an agent enrolled with an IPv6 address, and the alert is attributed to that agent. The location string changes for every agent, from name-ip->ossec-monitord to (name) ip->ossec-monitord (ANT-2026-U64THXI1)

  • @atomicturtle - PR 2449 - Skip a Windows wildcard <location> name that FindFirstFileA returns with * or ? in it. The agent is built without UNICODE, so a character outside the ANSI code page comes back as ? and the expansion feeds that name back in as another pattern, hanging logcollector at service start. Those names cannot be opened through the ANSI API. A \\?\ prefix is still not a wildcard (ANT-2026-WJND95HE)

  • @atomicturtle - PR 2448 - NUL-terminate the CDB value copied by address_match_key_value (calloc(vlen + 1) in both the exact-address and subnet lookups), so an anchored check_value is compared against the list entry and not the byte after the allocation (ANT-2026-WI6TBPFX)

  • @atomicturtle - PR 2447 - File daily-report top entries in hash tables and sort each table once, and grow the kept-alert array geometrically, so a day of distinct locations, users, or source addresses cannot stall ossec-monitord after midnight (ANT-2026-AVE66YB6)

  • @atomicturtle - PR 2446 - Create var/run pid files with O_EXCL and fchmod the descriptor, so a process in group ossec cannot make a root daemon append to or chmod an arbitrary file through a symlink planted in the group-writable pid directory (ANT-2026-1O4BCXPR)

  • @atomicturtle - PR 2445 - Keep one report_changes snapshot per file and stop copying once queue/diff reaches syscheck.diff_quota_size (default 1 GiB). state.* and diff.* are removed after the alert is read, and a deleted file's snapshot is removed with it, so report_changes cannot fill the disk (ANT-2026-4T9F7XIQ)

  • @atomicturtle - PR 2444 - Look each syscheck directory entry up on the directory that was opened (fstatat/openat/fdopendir with O_NOFOLLOW), and do not follow a symlink below a configured directory on the realtime path, so a local user cannot redirect the walk onto root-only files (ANT-2026-MBH20U16)

  • @atomicturtle - PR 2443 - Stop ossec-syscheckd from hashing or fully reading a file past syscheck.file_max_size (default 1024 MB; one MD5+SHA-1+SHA-256 pass) and from copying a report_changes snapshot past syscheck.diff_max_size (default 10 MB). Rootcheck policy reads stop after 100000 lines, and /dev/shm is not read unless <readall> is set, so one sparse file cannot stall FIM and rootcheck (ANT-2026-J8XF7LCX)

  • @atomicturtle - PR 2442 - Open report_changes snapshots and live-file hashes via a per-component openat(O_NOFOLLOW) walk (fopen_regular_nofollow / OS_SHA256_File_nofollow), and refuse leaf symlinks in seechanges_addfile, so a local user cannot redirect diffs at a root-only file through a leaf or parent symlink (ANT-2026-2138NB95)

  • @atomicturtle - PR 2441 - Pause rootcheck's hidden-process scan only for PIDs that do not add up (and at most rootcheck.sleep_after times per pass, default 32), so idle threads cannot stall realtime FIM for rootcheck.sleep seconds each (ANT-2026-AE2I21JQ); look up directory entries via fstatat/openat/fdopendir on the open parent so a local user cannot hang the scan with a symlink ring (ANT-2026-W5QJUUX2)

  • @atomicturtle - PR 2440 - On manager/local installs, open rootcheck rootkit_files / rootkit_trojans / system_audit policies only when they are regular, root-owned, and not group/other-writable (O_NOFOLLOW); install those etc/shared texts as root:ossec 0640 (agents unchanged) so group ossec cannot replace a policy and read root-only files via alerts (ANT-2026-B5Y9PIU1). Existing ossec-owned or group-writable custom policies are ignored until fixed.

  • @atomicturtle - PR 2439 - Shell-quote kernel-reported interface names in rootcheck run_ifconfig() (and refuse empty / leading-- names) so CAP_NET_ADMIN cannot inject commands through system(ifconfig …) (ANT-2026-9UQVLIX8); do not split readdir() paths at , in rk_check_dir() so a directory named , cannot recurse forever (ANT-2026-CDYKRRHO)

  • @atomicturtle - PR 2438 - Drain every complete alert from alerts.log in one ossec-logcollector poll for <log_format>ossecalert</log_format> (hybrid forwarder), so a burst cannot leave unread records that are lost on day rotation; still honor logcollector.max_lines per visit (ANT-2026-1HUE1BMJ)

  • @atomicturtle - PR 2437 - Stop ossec-syscheckd from hanging on a FIFO planted under report_changes / FIM / rootcheck paths: OS_SHA256_File / OS_MD5_SHA1_File / seechanges_dupfile / rk_check_file / os_string use fopen_regular(), seechanges_addfile refuses non-regular files, and is_file / read_sys_file open with O_NONBLOCK (ANT-2026-KZAJSOET)

  • @atomicturtle - PR 2436 - Store an agent's crypto_method in ReadSecMSG only after the datagram authenticates, so an unauthenticated !id!: / #AES: frame cannot flip manager-to-agent AES/Blowfish framing and drop AR / agent_control / merged.mg until the next keep-alive (ANT-2026-2NLM3GPL)

  • @atomicturtle - PR 2435 - Release ossec-remoted syslog TCP workers from dead or idle clients: report EOF as 0, enable TCP keepalive (TCP_KEEPIDLE = read timeout), stop retrying ETIMEDOUT, and close a quiet connection only while the worker pool is exhausted so a queued sender can be served (ANT-2026-QY1SHLVV)

  • @atomicturtle - PR 2434 - Bound ReadSecMSG zlib inflate to the room left in the receive buffer after !<id>! / #AES: prefixes (buffer_max), so an enrolled agent cannot write past ossec-remoted's stack buffer with an oversized compressed payload (ANT-2026-739QMECR)

  • @atomicturtle - PR 2433 - Rate-limit ossec-remoted pre-auth rejection logging (denied IP, bad header, unknown ID, and ReadSecMSG decrypt/format failures): up to 20 lines per listener per minute plus a skipped-count summary, so an unauthenticated sender cannot fill logs/ossec.log (ANT-2026-JA2NXEW1)

  • @atomicturtle - PR 2432 - Persist each agent's receive counter to queue/rids before OS_FreeKeys (client.keys reload) and on orderly ossec-remoted shutdown, so a keyless !id! after a keys mtime change (or a restart) cannot rewind verify_msg_id and replay captured agent datagrams (ANT-2026-FBJ3LA25)

  • @atomicturtle - PR 2431 - Escape leading dots in ossec-maild / ossec-monitord mail bodies (RFC 5321 4.5.2 for native SMTP; . for sendmail-like pipes) so a lone . log line cannot end DATA early, drop later alerts in the batch, or turn them into SMTP commands (ANT-2026-RXKNZJ1N; USE_CURL=yes already safe)

  • @atomicturtle - PR 2430 - Keep granular email_alerts matches per alert in ossec-maild and send one grouped mail per recipient set (OS_SplitMailBatch), so an event_location/group/level recipient no longer receives other agents' alerts that share the same grouping window. One batch can become several SMTP transactions, each counted against email_maxperhour (ANT-2026-CZG2BRKO)

  • @atomicturtle - PR 2429 - Keep do_not_group granular recipients when ossec-maild commits a waiting batch: restore the pre-pthread clear loop so parked DONOTGROUP marks become FULL_FORMAT instead of being wiped (ANT-2026-X2IU8BSU)

  • @atomicturtle - PR 2428 - Stop ossec-logcollector from hanging when a monitored log is replaced by a FIFO or device: rotation uses stat() by name (no throwaway fopen), and non-syslog-pipe opens go through fopen_regular() (O_NONBLOCK|O_NOCTTY, regular files only). Installations that pointed a non-pipe log_format at a FIFO must switch that entry to syslog-pipe (ANT-2026-U9RISGGM)

  • @atomicturtle - PR 2427 - Include the user argument in ossec-execd's timeout-list duplicate check (and in the repeated_offenders key), so disable-account for one account cannot suppress lockouts for other accounts while IP is - (ANT-2026-2LGOJR12)

  • @atomicturtle - PR 2426 - Drop incomplete active-response requests in ossec-execd before the timeout-list compare (avoid NULL strcmp on a missing IP). In OS_Exec, if the 1023-byte request would clip, retry without location/filename so IP-based responses still run, and only ignore the request when the name/user/IP prefix itself cannot fit (ANT-2026-SNXGRHGA)

  • @atomicturtle - PR 2425 - Escape alertid (and MySQL tld/srcgeoip) in ossec-dbd OS_Alert_InsertDB like the other string columns, and bound alertid to the schema VARCHAR(30), so a forged ** Alert line cannot inject SQL into the alert INSERT (ANT-2026-SINT56KO; srcip/dstip already escaped via sql_nullable_str, cf. Wazuh GHSA-6j39-726h-fx6p)

  • @atomicturtle - PR 2424 - Escape Splunk and CEF syslog_output fields in ossec-csyslogd: strip ", double \, and turn CR/LF into spaces in Splunk key="value" values, and run src=/shost=/dhost= and hash extensions through cefescape(), so logged usernames or addresses cannot inject extra SIEM key/value pairs (ANT-2026-RXUWSL9Z)

  • @atomicturtle - PR 2401 - Skip the syscheck integrity-DB linear scan on an index miss when the per-agent hash index is complete (mark incomplete only on calloc/OSHash_Add/read failures), so one agent cannot stall analysisd by reporting new file names (ANT-2026-8STI0Q1E)

  • @atomicturtle - PR 2400 - Hash OSHash keys over a prime field and seed the multiplier from randombytes, so a seed-independent Thue-Morse collision family can no longer force every FTS (and other) key into one chain (ANT-2026-3WKK50NE)

  • @atomicturtle - PR 2399 - Cut the maild subject host at the -> separator (not strchr('>')-1), so a location that starts with > cannot write one byte before the heap string and abort ossec-maild (ANT-2026-H2JMYHXZ)

  • @atomicturtle - PR 2398 - Fix read_syslog over-long line handling: drop the always-true strchr(str, '\\0') branch from #913, detect full reads by byte count, map embedded NULs to spaces, and skip mid-line remainders across polls so a long access-log field cannot inject a forged standalone event (ANT-2026-RNCE3SO7)

  • @atomicturtle - PR 2397 - Roll analysisd daily logs forward only (ignore a match-shard event older than the last rollover unless the clock was set back), and reopen the alerts file in Read_FileMon when its path no longer names the open inode (as jqueue_next already does for JSON), so a late pre-midnight backlog cannot unlink today's empty alerts file and leave csyslogd/maild/dbd reading a deleted inode for the rest of the day (ANT-2026-35JW8GHU)

  • @atomicturtle - PR 2396 - Stop GetAlertData from treating event text as alert headers (whole-line reads, headers only where OS_Log writes them, no blank line inside a record, and NULL group guards in csyslogd/maild/reportd), so a long access-log line or correlation previous-output cannot forge rule/level or crash output daemons (ANT-2026-KTGCYZ58)

  • @atomicturtle - PR 2395 - Drop the blocking reverse/forward DNS lookup from the is_valid_crawler compiled rule (31140): an unanswered PTR for a 4xx client address stalled an analysisd rule-matching thread for the resolver timeout per log line (ANT-2026-S3EU4A19)

  • @atomicturtle - PR 2394 - Prefix analysisd accumulator keys with the OSSEC agent name (keeping the log hostname), so one agent cannot forge another agent's OpenLDAP srcip/user via a shared device hostname after #1668 (ANT-2026-ZQN8MYKG)

  • @atomicturtle - PR 2393 - Make queue/diff sticky root:ossec with a root-owned local/, and refuse report_changes store directories that are links or writable by others, so user ossec cannot plant symlinks that root ossec-syscheckd follows (ANT-2026-96VSXF8B)

  • @atomicturtle - PR 2391 - Retire <syscheck><prefilter_cmd> (prelink-era hash filter): ignore the tag with a warning so upgrades keep loading, and remove the popen() sink that let a crafted file name run as root (ANT-2026-3VN001L2; supersedes ANT-2026-D7ZVXNZP)

  • @atomicturtle - PR 2392 - Give each <nodiff> node its own append index (like <ignore>), so plain and sregex entries no longer share a stale counter that could heap-overflow or silently drop rules (ANT-2026-C186EP5N)

  • @atomicturtle - PR 2379 - Sanitize ; in ossecalert-forwarded alert fields and bound srcip/user so a logged username cannot inject a second srcip: on the central manager (ANT-2026-8TB11KJO)

  • @atomicturtle - PR 2378 - Bound syscheck read_dir() path joins so a near-PATH_MAX directory cannot wrap the entry strncpy size and crash ossec-syscheckd (ANT-2026-1UF4D24F); skip too-long entries and compose with snprintf

  • @atomicturtle - PR 2377 - Create Unix-domain queue sockets with their final mode via umask around bind() instead of a path chmod() afterwards, so a raced symlink in a group-writable queue dir cannot make root-owned files group-writable (ANT-2026-1EAZN37N)

  • @atomicturtle - PR 2376 - Store analysisd syscheck index checksum prefixes on the heap instead of embedding OS_MAXSTR per file so one agent cannot pin ~6 KB of manager RAM per new path (ANT-2026-VUTSB5RB / #2373)

  • @atomicturtle - PR 2375 - Fix Windows w_ref_parent_folder so a mixed \.. / /..name path cannot bypass the active-response path check (ANT-2026-1IXHWDKW / CVE-2018-19666); reject path separators and .. in merged.mg entry names on merge and unmerge

  • @atomicturtle - PR 2358 - Guard empty syscheck filename stripping in GetAlertData so a crafted Integrity checksum changed for: ' line cannot underflow the heap (CVE-2026-26204)

  • @atomicturtle - PR 2357 - Disable TLS renegotiation in the shared authd/agent-auth get_ssl_context (SSL_OP_NO_RENEGOTIATION, with an info-callback fallback on older OpenSSL/LibreSSL) (#2100)

Bug Fixes

  • @atomicturtle - PR 2374 - Size analysisd auto thread pools from cgroup CPU quota and scheduler affinity (os_get_nproc), not host sysconf(_SC_NPROCESSORS_ONLN), so Docker/Kubernetes CPU limits do not inflate memory (#2373)
  • @atomicturtle - PR 2352 - Refuse merged-file entry names that contain .. in UnmergeFiles so a crafted merged.mg cannot write outside the agent shared directory
  • @atomicturtle - PR 2351 - Parent SSH CRC-32 rule 5714 on the sshd group and count one prior 5713, so the compensation line alerts instead of falling through to rule 1002
  • @atomicturtle - PR 2350 - Give each Unix-socket bind, connect, and recv its own address so remoted's active-response bind cannot collide with the analysisd queue and exit with Address already in use
  • @atomicturtle - PR 2337 - Set Windows localfile glob_set only after a successful wildcard expansion so a failed first pattern does not wrap pl and abort config read (#1954)
  • @atomicturtle - PR 2341 - Ship an agent-only logrotate for ossec.log; agents do not run monitord (#704)
  • @atomicturtle - PR 2328 - Skip Windows Subject machine accounts (name$) when decoding Account Name so 4624/4625 keep the logon user (#1959)
  • @atomicturtle - PR 2331 - Read the 4-character !+++ FIM new-file marker in DB_ProcessFoundEntry and syscheck_control so create rows do not false-alert or lose the marker (#1831)
  • @atomicturtle - PR 2346 - Stage bundled PCRE2 under pcre2_local/ so macOS case-insensitive filesystems do not collide with the tarball INSTALL docs file (#1957)
  • @atomicturtle - PR 2338 - Retry a realtime integrity check when the file is still locked or briefly missing, so emptying a file alerts without waiting for the next edit (#1386)
  • @atomicturtle - PR 2337 - Add Windows <localfile> wildcard expansion (* / ?, including multi-segment paths) and rotate date-based locations when the full strftime name changes so %H / %M work (#1954)
  • @atomicturtle - PR 2333 - Fix Windows registry syscheck on 64-bit hosts: windows_registry supports arch="32bit|64bit|both" with KEY_WOW64_* access; the 32-bit view keeps the legacy DB path and the 64-bit view is prefixed arch64: (collision-free). Default view is 32-bit regardless of agent bitness; unknown windows_registry attributes are rejected (#954)
  • @atomicturtle - PR 2318 - Take the IIS default W3C sc-status from the fields that follow it, so a referer of /404 or 200 and a three-digit sc-substatus are not the response code (#989)
  • @atomicturtle - PR 2328 - Reject an ossec-dbd INSERT whose base query cannot fit, and reserve the SQL buffer's terminating NUL when capping full_log (#1959)
  • @atomicturtle - PR 2325 - Bound agent decrypt backoff so a burst of bad or empty replies sleeps once per drain and still fails over (#1944)
  • @atomicturtle - PR 2321 - Log GetSecurityInfo's return code when a Windows FIM owner lookup fails (#1581)
  • @atomicturtle - PR 2330 - Apply both exact and sregex registry_ignore entries so default \Enum$ is not skipped (#851)
  • @atomicturtle - PR 2329 - Scan realtime-created paths with read_file so short-lived files do not flood ossec.log with Error opening directory (#1792)
  • @atomicturtle - PR 2328 - Extract Windows 4625 UPN Account Name (skip Subject -) and budget ossec-dbd INSERT fields so oversized alerts cannot truncate mid-quote (#1959)
  • @atomicturtle - PR 2325 - Back off when the agent cannot decrypt a server reply so a bad or missing key cannot peg a CPU core (#1944)
  • @atomicturtle - PR 2323 - Stop truncating alert full_log / previous-output lines at 1256 bytes in alerts.log (#473)
  • @atomicturtle - PR 2321 - Stop Windows CreateFile/GetSecurityInfo failures from becoming false syscheck size-change alerts (#1581)
  • @atomicturtle - PR 2319 - Drop rule 31107 so search URLs no longer suppress SQLi/XSS/web-attack alerts (#1078)

Don't miss a new ossec-hids release

NewReleases is sending notifications on new releases.