|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools/ocaml: Fix OoB read in stub_syslog()
commit 912ae5bcb80724a2f41fbe7a31347953b8b2cb4c
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Nov 16 22:16:49 2026 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Nov 24 12:08:12 2026 +0000
tools/ocaml: Fix OoB read in stub_syslog()
__syslog_facility_table[] maps Ocaml LOG_* facilities indices to local
system
indices. The final line is intended to initialise 6 entries in the table,
but
only initalises one with the logical OR of 6 facilities, making the table 5
entries too short.
This is probably a copy&paste error from Ocaml, where | is right operator to
use for a list of this nature.
Fixes: ea8ddf27e5c8 ("ocaml: add logging bindings.")
Assisted-by: LLM
Reported-by: Olivier Lambert <olivier.lambert@xxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Andrii Sultanov <andriy.sultanov@xxxxxxxxxx>
---
tools/ocaml/xenstored/syslog_stubs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/ocaml/xenstored/syslog_stubs.c
b/tools/ocaml/xenstored/syslog_stubs.c
index 760e78ff73..16c7202d39 100644
--- a/tools/ocaml/xenstored/syslog_stubs.c
+++ b/tools/ocaml/xenstored/syslog_stubs.c
@@ -30,7 +30,7 @@ static int __syslog_facility_table[] = {
LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP, LOG_KERN,
LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3,
LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7,
- LOG_LPR | LOG_MAIL | LOG_NEWS | LOG_SYSLOG | LOG_USER | LOG_UUCP
+ LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP,
};
value stub_syslog(value facility, value level, value msg)
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |