Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 48 additions & 18 deletions apple/imac/14-2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,55 @@
../../../common/hidpi.nix
];

boot = {
initrd.kernelModules = [
"applesmc"
"applespi"
"intel_lpss_pci"
"spi_pxa2xx_platform"
"kvm-intel"
];
blacklistedKernelModules = [
"b43"
"ssb"
"brcmfmac"
"brcmsmac"
"bcma"
];
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
options = {
hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable the legacy Broadcom WiFi driver (wl) with known security vulnerabilities.

This driver is vulnerable to heap buffer overflows:
- CVE-2019-9501 (https://github.com/advisories/GHSA-vjw8-c937-7hwp)
- CVE-2019-9502 (https://github.com/advisories/GHSA-4rfg-8q34-prmp)

Attackers within WiFi range can exploit this vulnerability by sending crafted
WiFi packets, even without being connected to the same network. Simply having
WiFi enabled makes the system vulnerable to arbitrary code execution or denial-of-service.
Only enable if no alternative WiFi solution is available.
'';
};
};

hardware = {
bluetooth.enable = lib.mkDefault true;
config = {
boot = {
initrd.kernelModules = [
"applesmc"
"applespi"
"intel_lpss_pci"
"spi_pxa2xx_platform"
"kvm-intel"
];
blacklistedKernelModules = [
"b43"
"ssb"
"brcmfmac"
"brcmsmac"
"bcma"
];
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
extraModulePackages =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[
(config.boot.kernelPackages.broadcom_sta.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // {
knownVulnerabilities = [ ];
};
}))
];
};

hardware = {
bluetooth.enable = lib.mkDefault true;
};
};
}
47 changes: 40 additions & 7 deletions apple/macbook-air/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,47 @@
{
imports = [ ../. ];

boot.blacklistedKernelModules = [ "bcma" ];
options = {
hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable the legacy Broadcom WiFi driver (wl) with known security vulnerabilities.

boot = {
# Divides power consumption by two.
kernelParams = [ "acpi_osi=" ];
This driver is vulnerable to heap buffer overflows:
- CVE-2019-9501 (https://github.com/advisories/GHSA-vjw8-c937-7hwp)
- CVE-2019-9502 (https://github.com/advisories/GHSA-4rfg-8q34-prmp)

Attackers within WiFi range can exploit this vulnerability by sending crafted
WiFi packets, even without being connected to the same network. Simply having
WiFi enabled makes the system vulnerable to arbitrary code execution or denial-of-service.
Only enable if no alternative WiFi solution is available.
'';
};
};

services.xserver.deviceSection = lib.mkDefault ''
Option "TearFree" "true"
'';
config = {
boot = {
# Divides power consumption by two.
kernelParams = [ "acpi_osi=" ];

blacklistedKernelModules = [ "bcma" ];
kernelModules = lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities [
"wl"
];
extraModulePackages =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[
(config.boot.kernelPackages.broadcom_sta.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // {
knownVulnerabilities = [ ];
};
}))
];
};

services.xserver.deviceSection = lib.mkDefault ''
Option "TearFree" "true"
'';
};
}
35 changes: 34 additions & 1 deletion apple/macbook-pro/11-1/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,38 @@
../../../common/cpu/intel/haswell
];

hardware.enableRedistributableFirmware = lib.mkDefault true;
options = {
hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable the legacy Broadcom WiFi driver (wl) with known security vulnerabilities.

This driver is vulnerable to heap buffer overflows:
- CVE-2019-9501 (https://github.com/advisories/GHSA-vjw8-c937-7hwp)
- CVE-2019-9502 (https://github.com/advisories/GHSA-4rfg-8q34-prmp)

Attackers within WiFi range can exploit this vulnerability by sending crafted
WiFi packets, even without being connected to the same network. Simply having
WiFi enabled makes the system vulnerable to arbitrary code execution or denial-of-service.
Only enable if no alternative WiFi solution is available.
'';
};
};

config = {
hardware.enableRedistributableFirmware = lib.mkDefault true; # broadcom-wl
boot.kernelModules =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[ "wl" ];
boot.extraModulePackages =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[
(config.boot.kernelPackages.broadcom_sta.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // {
knownVulnerabilities = [ ];
};
}))
];
};
}
40 changes: 37 additions & 3 deletions dell/inspiron/3442/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,42 @@
../../../common/pc/laptop
];

services = {
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
options = {
hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable the legacy Broadcom WiFi driver (wl) with known security vulnerabilities.

This driver is vulnerable to heap buffer overflows:
- CVE-2019-9501 (https://github.com/advisories/GHSA-vjw8-c937-7hwp)
- CVE-2019-9502 (https://github.com/advisories/GHSA-4rfg-8q34-prmp)

Attackers within WiFi range can exploit this vulnerability by sending crafted
WiFi packets, even without being connected to the same network. Simply having
WiFi enabled makes the system vulnerable to arbitrary code execution or denial-of-service.
Only enable if no alternative WiFi solution is available.
'';
};
};

config = {
boot.kernelModules =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[ "wl" ];
boot.extraModulePackages =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[
(config.boot.kernelPackages.broadcom_sta.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // {
knownVulnerabilities = [ ];
};
}))
];

services = {
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
};
};
}
41 changes: 35 additions & 6 deletions dell/xps/13-9343/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,43 @@
../../../common/pc/ssd
];

services = {
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
options = {
hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable the legacy Broadcom WiFi driver (wl) with known security vulnerabilities.

This driver is vulnerable to heap buffer overflows:
- CVE-2019-9501 (https://github.com/advisories/GHSA-vjw8-c937-7hwp)
- CVE-2019-9502 (https://github.com/advisories/GHSA-4rfg-8q34-prmp)

Attackers within WiFi range can exploit this vulnerability by sending crafted
WiFi packets, even without being connected to the same network. Simply having
WiFi enabled makes the system vulnerable to arbitrary code execution or denial-of-service.
Only enable if no alternative WiFi solution is available.
'';
};
};

boot = {
kernelModules = [
config = {
boot.kernelModules = [
"kvm-intel"
];
]
++ lib.optionals config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities [ "wl" ];
boot.extraModulePackages =
lib.mkIf config.hardware.broadcom.wifi.enableLegacyDriverWithKnownVulnerabilities
[
(config.boot.kernelPackages.broadcom_sta.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // {
knownVulnerabilities = [ ];
};
}))
];

services = {
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
};
};
}