AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
//! Fuzz the SQL parser behind `/_sql`.
//!
//! A second hand-written tokeniser and recursive-descent parser, reachable
//! with a single POST. ES's own equivalent surface produced CVE-2024-43709
//! (crafted SQL query → OutOfMemoryError → node crash), so "does a crafted
//! statement panic or allocate without bound" is the exact question here.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let Ok(sql) = std::str::from_utf8(data) else {
return;
};
if sql.len() > 8192 {
return;
}
let _ = xerj_engine::sql::parse_sql(sql);
});