Assembly language 64 bit pentester academy

global _start

section .text
_start:

jmp short call_shellcode

shellcode:
xor rax, rax

pop rdi

mov [rdi +7], byte ah
mov [rdi +8] , rdi
mov [rdi +16], rax

lea rsi, [rdi +8]
lea rdx, [rdi +16]

add rax, 59
syscall

call_shellcode:

call shellcode
message db "/bin/shABBBBBBBBCCCCCCCC"

In this assembly code during gdb analysis the code return Segmentation fault (core dumped) error when we reach this line “mov [rdi +7], byte ah” in 64bit ubuntu? why is this happening?