diff options
author | multi <depot@in-addr.xyz> | 2020-08-09T23·24+0000 |
---|---|---|
committer | multi <depot@in-addr.xyz> | 2020-08-10T16·37+0000 |
commit | 5851f672aca266bd2716d1b82bc81817d629abc0 (patch) | |
tree | f33e1e8214dc3371ee86397bc0031311e1ff0399 /users/multi/pkgs/htop/zfs-arc-stats/0001-Specify-correct-MIB-length.patch | |
parent | 5e58c8bc288a8da06fc383e45aa30ade0293faa3 (diff) |
feat(users/multi): bootstrap home-manager configuration for whitby r/1630
Change-Id: Iad3024a5a640d33377cfae436134fda9f358397b Reviewed-on: https://cl.tvl.fyi/c/depot/+/1703 Tested-by: BuildkiteCI Reviewed-by: multi <depot@in-addr.xyz>
Diffstat (limited to 'users/multi/pkgs/htop/zfs-arc-stats/0001-Specify-correct-MIB-length.patch')
-rw-r--r-- | users/multi/pkgs/htop/zfs-arc-stats/0001-Specify-correct-MIB-length.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/users/multi/pkgs/htop/zfs-arc-stats/0001-Specify-correct-MIB-length.patch b/users/multi/pkgs/htop/zfs-arc-stats/0001-Specify-correct-MIB-length.patch new file mode 100644 index 000000000000..5bd4d5edfa5b --- /dev/null +++ b/users/multi/pkgs/htop/zfs-arc-stats/0001-Specify-correct-MIB-length.patch @@ -0,0 +1,27 @@ +From 92258e99e639795f4119a86a1c44d5015b29ffdc Mon Sep 17 00:00:00 2001 +From: Ross Williams <ross@ross-williams.net> +Date: Sat, 6 Jul 2019 04:27:00 +0000 +Subject: [PATCH 1/9] Specify correct MIB length + +Could have resulted in a buffer overflow if the +FreeBSD kernel returned more bytes than expected. +--- + freebsd/FreeBSDProcessList.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c +index 9fef324..26019b6 100644 +--- a/freebsd/FreeBSDProcessList.c ++++ b/freebsd/FreeBSDProcessList.c +@@ -121,7 +121,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui + len = sizeof(fpl->memZfsArc); + if (sysctlbyname("kstat.zfs.misc.arcstats.size", &fpl->memZfsArc, &len, + NULL, 0) == 0 && fpl->memZfsArc != 0) { +- sysctlnametomib("kstat.zfs.misc.arcstats.size", MIB_kstat_zfs_misc_arcstats_size, &len); ++ len = 5; sysctlnametomib("kstat.zfs.misc.arcstats.size", MIB_kstat_zfs_misc_arcstats_size, &len); + fpl->zfsArcEnabled = 1; + } else { + fpl->zfsArcEnabled = 0; +-- +2.20.1 + |