diff --git a/main/samba/APKBUILD b/main/samba/APKBUILD
index e004816504350642b8692c435ce33e03fd3fc310..c5780b8819f65bea7483f1eed78ee58dd8084148 100644
--- a/main/samba/APKBUILD
+++ b/main/samba/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=samba
-pkgver=4.15.7
-pkgrel=1
+pkgver=4.15.9
+pkgrel=0
 pkgdesc="Tools to access a server's filespace and printers via SMB"
 url="https://www.samba.org/"
 arch="all"
@@ -82,6 +82,7 @@ makedepends="
 # vfs_btrfs patch from https://bugzilla.samba.org/show_bug.cgi?id=14790
 source="
 	https://download.samba.org/pub/samba/stable/samba-$pkgver.tar.gz
+	netgroup.patch
 	getpwent_r.patch
 	musl_uintptr.patch
 	netdb-defines.patch
@@ -99,6 +100,12 @@ source="
 pkggroups="winbind"
 
 # secfixes:
+#   4.15.9-r0:
+#     - CVE-2022-2031
+#     - CVE-2022-32744
+#     - CVE-2022-32745
+#     - CVE-2022-32746
+#     - CVE-2022-32742
 #   4.15.2-r0:
 #     - CVE-2016-2124
 #     - CVE-2020-25717
@@ -616,10 +623,11 @@ libs() {
 }
 
 sha512sums="
-beffb09b5bcd62991398d39c7a8aec5fed0c51d550e2f0fb42b2e0a09094f4c6a8f29adf708c4969db12329f5c7343d2debd04315107b79bef59e99a4a7e4ce4  samba-4.15.7.tar.gz
+2ee5d66f5a7c1ff5b27c959be6310335eb6484476c1eadb3b8ca1bc84fb2260487136c1318539e1dc459b81bca66f268fd979f6a816ff5f905bd605a99685004  samba-4.15.9.tar.gz
+f997d0bca9de64a567bccc245bec41e4aa00bacb379d8e348678dcafcf7e723e8716608c5d2d266ad816439b8b93bb8ee28371308a01c9d9c50229f1fc8deb67  netgroup.patch
 58de5e79fdfd06e828d478e112d581d333a8bee88d2602b92204d780f0d707b27dd84f8e2e6b00fca40da81c8fe99aa5bcec70d8b393d3a0a83199c72a4aa48b  getpwent_r.patch
 b7906d66fe55a980a54161ee3f311b51bcbce76b8d4c8cc1ba6d0c5bdf98232cb192b9d2c1aa7b3e2742f5b9848c6cf429347940eefe66c3e0eda1d5aac1bf93  musl_uintptr.patch
-1854577d0e4457e27da367a6c7ec0fb5cfd63cefea0a39181c9d6e78cf8d3eb50878cdddeea3daeec955d00263151c2f86ea754ff4276ef98bc52c0276d9ffe8  netdb-defines.patch
+7bef9a3514f7a875f5955009807b79f9558c984da17fbb8c7cefd3b679a29e4bd08a422185d7cc6af8230b749d6769795039828b2315119bec4e0d0025169e0a  netdb-defines.patch
 3b4759dfcf6ec54f2131390c9eb7fd7dd23071e304905cdeaf7a9828fa888cb3dcb5c5bb6a07a634c51d0392ac47f6e22b937faf4354e3b07cfc0de7fdfa28e9  netapp.patch
 c0afe8b1dfddc5290c9aa611163d20adc3a546f54bba0081f739cda4255829f1a72bae422b6cb049aca82e58d4daf63ad5553f4c5c51671019bfbbc2781460f0  missing-headers.patch
 9bf4bbc8b03d9ea17d2f8ffeaf3a83541b171936a90bb8d75b08cc5afbdbaaec545c1b3782c90ae2ffc4568ab4e6f15fb21899d80c654a796301e16429c93b65  musl_rm_unistd_incl.patch
diff --git a/main/samba/netdb-defines.patch b/main/samba/netdb-defines.patch
index d7d6446abd68408ab203a5fc13c86309c72eb1ff..aa3794c795979dcce7a427812da78f08e5f9453e 100644
--- a/main/samba/netdb-defines.patch
+++ b/main/samba/netdb-defines.patch
@@ -1,8 +1,8 @@
 diff --git a/nsswitch/wins.c b/nsswitch/wins.c
-index dccb6dd..bb24acb 100644
+index 4f79cc6..348d95b 100644
 --- a/nsswitch/wins.c
-+++ b/nsswitch/wins.c
-@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
++++ b/nsswitch/wins.c    
+@@ -40,6 +40,14 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
  #define INADDRSZ 4
  #endif
  
@@ -15,5 +15,5 @@ index dccb6dd..bb24acb 100644
 +#endif
 +
  NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
- 				     struct hostent *he,
- 				     char *buffer,
+                                     struct hostent *he,
+                                     char *buffer,
diff --git a/main/samba/netgroup.patch b/main/samba/netgroup.patch
new file mode 100644
index 0000000000000000000000000000000000000000..59237bdc5e41a122b8be875a0276a01805df04c9
--- /dev/null
+++ b/main/samba/netgroup.patch
@@ -0,0 +1,15 @@
+diff --git a/source3/wscript b/source3/wscript
+index b664b6f..db1fc8b 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -629,8 +629,8 @@ msg.msg_accrightslen = sizeof(fd);
+                                 headers='unistd.h sys/types.h dirent.h',
+                                 define='HAVE_DIRENT_D_OFF')
+ 
+-    if (conf.CONFIG_SET('HAVE_GETDOMAINNAME')):
+-        conf.DEFINE('HAVE_NETGROUP', '1')
++ #   if (conf.CONFIG_SET('HAVE_GETDOMAINNAME')):
++ #       conf.DEFINE('HAVE_NETGROUP', '1')
+ 
+     # Look for CUPS
+     if Options.options.with_cups:
\ No newline at end of file